I agree. Most of our extensions are really complex.
In my opinion, traits must define variable. Else it defeats the whole
purpose of having a better modularity. Each time I use traits, I need
variables.
The solution of Visualworks was quite simple, and I think it makes
sense in most of the practical cases: when you compose traits, you
simply concatenate the variables defined in the composed traits with
the variables defined in the class. Duplicated names are then removed.
Easy.
Cheers,
Alexandre
On 25 Mar 2010, at 17:19, Stefan Marr wrote:
Hi Alexandre:
Thanks.
I have read all these papers already, but kind of hoped that there
is something I missed so far.
On 25 Mar 2010, at 23:00, Alexandre Bergel wrote:
"Stateful Traits and their Formalization"
http://scg.unibe.ch/scgbib?_k=OiaJOIuA&query=Berg08e&display=abstract
=> It describes stateful traits
"User-Changeable Visibility: Resolving Unanticipated Name Clashes
in Traits" http://scg.unibe.ch/scgbib?_k=NNRwidu5&query=freezable+traits&display=abstract
=>Freezable traits
"Adding State and Visibility Control to Traits using Lexical
Nesting" http://scg.unibe.ch/scgbib?_k=J-wbMltV&query=tom+cutsem+bergel
=> Traits for a class-less language
My problem is, that these proposals involve a lot additional
complexity.
And, Tom's paper is not really applicable to PHP. PHP just does not
have a real notion of lexical context.
Thanks
Stefan
--
Stefan Marr
Software Languages Lab
Vrije Universiteit Brussel
Pleinlaan 2 / B-1050 Brussels / Belgium
http://soft.vub.ac.be/~smarr
Phone: +32 2 629 2974
Fax: +32 2 629 3525
_______________________________________________
Pharo-project mailing list
[email protected]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
_______________________________________________
Pharo-project mailing list
[email protected]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project