doIfNotNil: -- let's bake the other half
Lex Spoon
lex at cc.gatech.edu
Mon Oct 16 22:46:31 UTC 2000
The #in: family actually sounds pretty good to me. (I hadn't realized
#in: was in the system; I do like the idea!). I like #inIfNotNil:
better than #ifNotNilIn:, though -- the first sounds more gramatical.
-Lex
Dan Ingalls <Dan.Ingalls at disney.com> wrote:
> Joshua Channing Gargus <schwa at cc.gatech.edu> asked...
> >What is the difference between doIfNotNil: and ifNotNil:?
>
> ... and then answered his own question.
>
> Since it's on the table, though, I want to say that
> I actually don't like the name doIfNotNil, in light of a long
> discussion several years ago that wound up condemning do:
> as defined by singleton objects (with which I basically agree).
> We wound up renaming that message to be 'in:' which is so
> general as to be meaningless, and nobody uses it as a result.
>
> So when it came to name this method, I couldn't hack 'ifNotNilIn:',
> and fell back on this 'do' flavor.
>
> Since the end result is <someBlock> value: <some receiver>,
> the patterns should probably be
>
> expr beValueFor: block
> expr ifNotNilBeValueFor: block
> or
> expr evaluate: block
> expr ifNotNilEvaluate: block
>
> Has this all been hashed around in other Smalltalks with some reaonable outcome?
>
> - Dan
More information about the Squeak-dev
mailing list
|