doIfNotNil: -- let's bake the other half
Joshua Channing Gargus
schwa at cc.gatech.edu
Mon Oct 16 04:26:07 UTC 2000
I like beValueFor: and ifNotNilBeValueFor:; even though they're
longer, they're much more "literate" that the evaluate: versions.
Joshua
On Sun, Oct 15, 2000 at 08:57:50PM -0700, Dan Ingalls 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
|