logo       

[ENH] pvt selector handling (was: Re: Design Patterns and Collection Classe: msg#01370

lang.smalltalk.squeak.general

Subject: [ENH] pvt selector handling (was: Re: Design Patterns and Collection Classes)

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

Attachment: %LessPvt.3.cs.gz
Description: application/applefile

Attachment: LessPvt.3.cs.gz
Description: Binary data

<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise