On Apr 13, 2006, at 4:25 AM, P T Withington wrote: > 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)? > Good idea. I'll make this change in a subsequent checkin. > 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? > I'll do this as well. > 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? > I'm not sure. I like that it shows the precedence, but having just a list of terms with the last one a class doesn't expose the traits- followed-by-class structure very well -- it's tough to read if you are new to the language. Maybe if the traits were comma-delimited, but there was a colon between traits and class?
<class name="activeview" extends="drawable, clickable, draggable : view"/> I should point out that this list order is the opposite of what it is in the current proposal, but it reads well: the traits sit between the class being declared and its superclass. > In the real implementation we will want traits to be implemented > for Class, not just UserClass right? (Or eliminate the distinction > between the two). > Yes. (And yes.) > 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
