[Pharo-project] [squeak-dev] Re: Why you need new Method trailers? :)

Igor Stasenko siguctua at gmail.com
Mon Dec 21 13:10:03 UTC 2009


2009/12/21 Adrian Lienhard <adi at netstyle.ch>:
> Yes, it also works for aliased methods.
>
> It should be ... @ {#methodB -> #methodA} meaning methodB is an alias for
> methodA
>

So, the pattern is:

@ { #newName -> #oldName }

hmm.. then there is no wonder, since i interpret it differently ,
assuming that pattern is:

@ { #existingName -> #aliasedName }

because, as to me , by reading this expression its more natural to
think that operand to the left of  '->'  is the 'initial' or
'original' state, and to the right - intended state,
but not reverse.

Otherwise, maybe its worth to use an explicit & different selector:

@ { #aliasedName <- #existingName }.
And in #<- create something other than Association, which will make
trait definitions a bit more error proof , by not allowing
associations in composition.
(just guessing)

Btw, it would be good to assert at such point, saying to user that he
attempts to make an alias of non-existing method.

> Cheers,
> Adrian
>
>



-- 
Best regards,
Igor Stasenko AKA sig.



More information about the Squeak-dev mailing list