[Laszlo-dev] For Review: Change 41430 Summary:Experimental traits implementation for lps-dev

P T Withington ptw at openlaszlo.org
Thu Apr 13 07:32:33 EDT 2006


On 2006-04-12, at 19:48 EDT, John Sundman wrote:

> Very cool.
>
> One nit:  the wiki defines a trait as follows:
>
> a trait is unit of behavior -- attributes, methods, events, and  
> subviews
>
> Is a handler a method, or is it a handler?  Logically of course  
> it's just a special case of method.  But in contexts like this,  
> should it say,  "attributes, methods, events, handlers and subviews"?
>
> My comment is more about the semantics of documenting handlers than  
> it is about traits, but I guess it's worth asking here.

Either handlers need to be called out separately, or we need a more  
generic term for handlers and methods.  Note that the most important  
distinction of handlers from methods is that they cannot be  
overridden in a subclass (or a trait).  Handlers 'accumulate'.  In  
meta-object-protocol speak, their 'method combination' is 'all',  
whereas the method combination for normal methods is 'most specific'.

We have a generic term for all of these things: 'properties' (that is  
what ECMA calls them), but we don't have generic terms for attribute- 
like properties (attributes and events) vs. method-like properties  
(methods and handlers).  Note also that right now events and  
attributes are in the same namespace (if you have an attribute 'one'  
an an event for the e attribute 'one', they will collide).  We may  
change that.



More information about the Laszlo-dev mailing list