[ENH] pvt selector handling (was: Re: Design Patterns and
Collection Classes)
Helge Horch
Helge.Horch at t-online.de
Fri Aug 30 13:09:38 UTC 2002
On 30.08.2002, Richard A. O'Keefe wrote:
>I guess if I propose a change to existing things I'll be howled down again,
>but it _would_ be nice if the compiler accepted
> (<self | super> <new | new:...>) pvtMessage...
>in a class.
Well, *I* think it's a reasonable request. The #pvtXXX support is in
the image anyway, this submission enhances it (I think), and it comes
down to a choice of style you choose to code in. As long as you
don't request the system to be rewritten, or that #perform: and
friends should also check it... ;-)
So, herewith is LessPvt.3.cs, this time with a preamble (but still no
checking for "Am I compiling in a metaclass context?" -- do we really
need that safety net?):
---snip---
Widens the Compiler's special handling of #pvtXXX selectors, to allow
the following usage patterns in class methods:
self new pvtXXX
(self new: n) pvtXXX
super new pvtXXX
(super new: n) pvtXXX
Previously, the Compiler allowed #pvtXXX method sends in instance methods only.
---snip---
Flame away :-)
Cheers,
Helge
-------------- next part --------------
Skipped content of type multipart/appledouble
More information about the Squeak-dev
mailing list
|