I may have understood incorrectly the idea behind and alias when using traits, but I was expecting that when using an alias, the aliased method would be removed and all the sender of that message would be change to the new one (the alias), but I don't see that happening.
You cannot do that in a dynamically typed language. Why because you do not know how to scope the method renaming. Aliasing is not renaming. Stef
Here is some code:
Trait named: #SomeTrait uses: {}
SomeTrait>>m1 ^ 1 SomeTrait>>m2 self m1
Object subclass: #SomeClass uses: SomeTrait @ { #m3 -> #m1}
It generates: SomeClass>>m1 ^ 1 SomeClass>>m2 self m1 SomeClass>>m3 ^1
But I was specting: SomeClass>>m2 self m3 SomeClass>>m3 ^1 and the method SomeClass>>m1 removed.
Was my interpretation of Alias incorrect? or is the current implementation of alias incorrect? (maybe due to some implementation problems?)
Thanks! Hernan.
-- Hernán Wilkinson Agile Software Development, Teaching & Coaching Phone: +54 - 011 - 6091 - 3125 Mobile: +54 - 911 - 4470 - 7207 email: hernan.wilkinson@10Pines.com site: http://www.10Pines.com Address: Alem 693, Floor 5 B, Buenos Aires, Argentina