[ENH] reposted: new String modifier: String>>asPlural

Julian Fitzell julian at beta4.com
Tue Jun 8 06:58:22 UTC 2004


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 
class.  I'd suggest something more like #pluralized (though then we get 
into the debate of whether to use an S or a Z :) ).

I actually find the whole method somewhat suspect since it ends up being 
a whole lot of special cases but Andrew insists on using a similar 
mechanism (in fact, with the same objectionable selector) at work and I 
can't quite put my finger on a better solution.

Anyway, not a huge deal (and I certainly take my lumps for not speaking 
up sooner) but better late than never I guess.

David T. Lewis wrote:
> This is a nice little enhancement by Chris Norton that helps Squeak to
> speak gooder English.
> 
> It was timed out on the BFAV list, so I am posting with a different
> subject line. The attached change set is the original one, and works
> fine in a 3.7 image.
> 
> Here is the original message posted by Chris in January 2000:
> 
> 
>>Hi Folks.
>>
>>Here's the preamble from my changeset:
>>
>>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>>"OK.  You could say that this is a silly crusade, but I like my Squeak
>>messages to be in proper English (at least when the language you're using is
>>English).  
>>
>>I was messing around with the HangMan file-in and I got a walkback that had
>>the following title:  'Error: HangManPhrases classs are not indexable'.  I
>>just couldn't stand the extra 's' on 'class', so I created a nifty new
>>String method called asPlural and I modified the sender of the odd string to
>>use the new String modifier.  Take it or leave it, but I think this makes
>>auto-generated text just a little easier to read."
>>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>>
>>I hope you find this new String modifier useful too.
>>
>>Cheers!
>>
>>---==> Chris
>>
>>
>>
>>------------------------------------------------------------------------
>>
>>



More information about the Squeak-dev mailing list