doIfNotNil: -- let's bake the other half
Helge Horch
Helge.Horch at munich.netsurf.de
Wed Oct 18 01:04:12 UTC 2000
At 23:12 17.10.2000 +0100, Peter Crowther wrote:
>"If Yoda so strong with the Force is, construct a sentence in the proper
>order why can't he? Hmmm?"
That, and:
"Yoda FORTH in thinks. Yoda deep thoughts stack grows thinks as."
[Peter da Silva, in s.d.m]
>I agree with the idea that the block should come last for Westerners, but
>also that block evaluation should include value: somewhere within it.
Hmm. In Forth, I'd just say ?DUP IF and be done with it. To be honest,
I'm a bit uncomfortable with the suggestions so far. The "talking"
suggestions like #unlessNilIn: or #ifNotNilEvaluate: sound so, um,
wordy. I'd probably use the explicit idiom (with an intermediate variable)
before I was going to learn and remember another conditional. The question
is, does it carry its own weight?
If the answer to that is "yes," my personal favourites are #feedTo: and
#feed:. No kidding -- because if it's nil, it can't feed anything anywhere.
Cheers,
Helge
P.S. How about #then:, it's very Forthy. ;-)
More information about the Squeak-dev
mailing list
|