Approved.  Comments:

Maybe add the trait name and supername into the interstitial name (so  
you have a clue when debugging which trait X super it is an  
interstitial for)?

We'll probably need to add some code to the debugger to make the  
display of instances of classes with traits informative.  Look at  
Debug.__typeof.  I think it probably wants to return a list of the  
traits followed by the class, or maybe just add an asterisk to the  
class and have Debug.inspect detail the traits?

In my prototype, I just used the superclass parameter to pass  
traits:  if it is a list, all but the last element are traits and the  
last is the superclass.  I liked this because it expresses the  
precedence of the traits/superclass.  Maybe that is a better syntax  
than having a separate traits list?

In the real implementation we will want traits to be implemented for  
Class, not just UserClass right?  (Or eliminate the distinction  
between the two).

Cool stuff!

On 2006-04-12, at 19:21 EDT, Jim Grandy wrote:

> Change 41430 by [EMAIL PROTECTED] on 2006/04/12 16:14:55 *pending*
>
>       Summary:Experimental traits implementation for lps-dev
>       
>       New Features:Traits
>       
>       Technical Reviewer: ptw (pending)
>       QA Reviewer: mdavis (pending)
>       Doc Reviewer: jsundman (pending)
>       
>       Documentation:Eventually will be derived from
>       http://wiki.openlaszlo.org/Traits_Proposal, but remember this is an
>       experimental feature and will not ship in final form until Legals
>       ships.
>       
>       Details:Added an experimental traits implementation. I debated
>       whether this belongs in trunk, but I think the benefits outweigh the
>       risks. This feature will not be final until Legals ships later this
>       year, so the chief risk is that the semantics will change in the
>       Legals implementation and people will need to adjust.
>       
>        Information about traits can be found at
>        http://wiki.openlaszlo.org/Traits_Proposal. This checkin implements
>        just the ability to declare traits in a class definition, not to
>        declare traits on a single instance. Introspection of traits for
>        classes is implemented, however.
>       
>       Tests:Augmented the test/traits.lzx unit test to cover attributes,  
> methods,
>       and subnodes. This unit test currently passes.
>
> Affected files ...
>
> ... //depot/lps-dev/WEB-INF/lps/lfc/core/LzClass.as#8 edit
> ... //depot/lps-dev/WEB-INF/lps/lfc/core/LzTrait.as#1 edit
> ... //depot/lps-dev/WEB-INF/lps/lfc/core/UserClass.as#5 edit
> ... //depot/lps-dev/WEB-INF/lps/lfc/glue/LaszloInitiator.as#7 edit
> ... //depot/lps-dev/WEB-INF/lps/schema/lzx.rnc#38 edit
> ... //depot/lps-dev/test/traits.lzx#3 edit
>
>
> <changeset-41430.zip>

_______________________________________________
Laszlo-dev mailing list
[email protected]
http://www.openlaszlo.org/mailman/listinfo/laszlo-dev

Reply via email to