[Pharo-project] Detecting overriding class extensions
Does anybody have a tool to detect class extensions which override methods? Because that's so bad it's evil. -- Simon
On Tue, Oct 20, 2009 at 1:24 PM, Simon Denier <Simon.Denier@inria.fr> wrote:
Does anybody have a tool to detect class extensions which override methods? Because that's so bad it's evil.
You can have a look at the following script which basically warns you if you load a package that overrides a method IIRC. -- Damien Cassou http://damiencassou.seasidehosting.st "Lambdas are relegated to relative obscurity until Java makes them popular by not having them." James Iry
You can also ask the PackageInfo for #overrideMethods. Lukas 2009/10/20 Damien Cassou <damien.cassou@gmail.com>:
On Tue, Oct 20, 2009 at 1:24 PM, Simon Denier <Simon.Denier@inria.fr> wrote:
Does anybody have a tool to detect class extensions which override methods? Because that's so bad it's evil.
You can have a look at the following script which basically warns you if you load a package that overrides a method IIRC.
-- Damien Cassou http://damiencassou.seasidehosting.st
"Lambdas are relegated to relative obscurity until Java makes them popular by not having them." James Iry
_______________________________________________ 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
On 20 oct. 2009, at 14:16, Lukas Renggli wrote:
You can also ask the PackageInfo for #overrideMethods.
ahah, interesting but broken, apparently nobody has used it for a long time? First, there is a gross spelling mistake in PackageInfo>>overrideMethods ^ self extensionMethods select: [:ea | self isOvverideMethod: ea] easy enough to correct. Second, isOverrideMethod: aMethodReference ^ aMethodReference category endsWith: '-override' uses a convention to identify override, but apparently Monticello does not follow its own convention anymore. Does anybody have an idea about what happened?
Lukas
2009/10/20 Damien Cassou <damien.cassou@gmail.com>:
On Tue, Oct 20, 2009 at 1:24 PM, Simon Denier <Simon.Denier@inria.fr> wrote:
Does anybody have a tool to detect class extensions which override methods? Because that's so bad it's evil.
You can have a look at the following script which basically warns you if you load a package that overrides a method IIRC.
-- Damien Cassou http://damiencassou.seasidehosting.st
"Lambdas are relegated to relative obscurity until Java makes them popular by not having them." James Iry
_______________________________________________ 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
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
-- Simon
On 20 oct. 2009, at 13:45, Damien Cassou wrote:
On Tue, Oct 20, 2009 at 1:24 PM, Simon Denier <Simon.Denier@inria.fr> wrote:
Does anybody have a tool to detect class extensions which override methods? Because that's so bad it's evil.
You can have a look at the following script which basically warns you if you load a package that overrides a method IIRC.
Sorry but I cant see a difference. Can you detail a use case that I can reproduce? (because I know there are still a few overrides in Moose but can not reproduce)
-- Damien Cassou http://damiencassou.seasidehosting.st
"Lambdas are relegated to relative obscurity until Java makes them popular by not having them." James Iry <WarnsAboutOverride-damiencassou. 1.cs>_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
-- Simon
On Tue, Oct 20, 2009 at 2:35 PM, Simon Denier <Simon.Denier@inria.fr> wrote:
You can have a look at the following script which basically warns you if you load a package that overrides a method IIRC.
Sorry but I cant see a difference. Can you detail a use case that I can reproduce? (because I know there are still a few overrides in Moose but can not reproduce)
You open a Pharo core image. You load the script. You load Moose => you will get exceptions if Moose override anything -- Damien Cassou http://damiencassou.seasidehosting.st "Lambdas are relegated to relative obscurity until Java makes them popular by not having them." James Iry
participants (3)
-
Damien Cassou -
Lukas Renggli -
Simon Denier