[ENH] reposted: new String modifier: String>>asPlural
Richard A. O'Keefe
ok at cs.otago.ac.nz
Tue Jun 8 07:44:42 UTC 2004
Julian Fitzell <julian at beta4.com> wrote:
Hmm... I should have posted this earlier since this ENH just got
included, but does anyone else find the selector #asPlural problematic?
I always think of #as... specifying a new class and there is no Plural
I would point to the Duration>>asSeconds selector in ANSI Smalltalk
(188.8.131.52) as demonstrating that asXXX does *not* imply that XXX is a class.
For that matter, in Squeak we have
Date>>asGregorian (there is no Gregorian class)
Date>>asJulianDayNumber (there is no JulianDayNumber class)
Float>>asApproximateFraction(there is no ApproximateFraction class)
Float>>asTrueFraction (spot the pattern?)
Float>>asIEEE32BitWord (it continues)
Collection>>asSortedArray (SortedCollection *is*, SortedArray *isn't*)
and at that point I decided enough prior art was enough.
I'm not saying that #asPlural _isn't_ problematic,
only that it is very far from being alone.
More information about the Squeak-dev