The class CUCastingExample in the following Pharo image <http://scg.unibe.ch/Research/DSL/diesel-languageaspects.zip> contains some language experiments along these lines. For example the keyword "this" starts the lookup of in the class the method is defined in. Similar receivers of message sends can be casted to any superclass using #cast:. Lukas On Sat, Feb 14, 2009 at 6:43 PM, Igor Stasenko <siguctua@gmail.com> wrote:
2009/2/14 Keith Hodges <keith_hodges@yahoo.co.uk>:
Stéphane Ducasse wrote:
Hi guys
some days ago with alex we wanted to identify the methods containing a reference to their class (Lint does it too). Now we thought that replacing them with self class is not equivalent since we could imagine
st/x uses
here class
that hardcoding the class name make sure that subclass cannot redefine methods. Now this is a bit against Smalltalk late bindinness and probably most of the time an newbie error.
I doubt it.
isAbstract
self class = here class.
If i understood, st/x
here class
is equivalent to squeak
thisContext method methodClass
right?
Keith
But I wanted to know what was your experiment to that regards.
Stef
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
-- Best regards, Igor Stasenko AKA sig.
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
-- Lukas Renggli http://www.lukas-renggli.ch