[ENH] ifNotEmptyCleans
Marcus Denker
denker at iam.unibe.ch
Thu Sep 30 10:57:08 UTC 2004
Am 30.09.2004 um 12:41 schrieb stéphane ducasse:
>
>
>> I really like the valueWithPossibleArgs: thingy: It does a
>> double-dispatch on the number of arguments
>> of the block, and just does the right thing. We really should keep it.
>
> But not like that. Sorry this is really bad
>
Why? It allows ifNotEmpty: to be compatible to both the old Squeak
version *and* the VisualWorks
version. That is really nice, and should be kept. If we remove that, we
get lots of trouble with e.g. RB
and a big fight over what the "correct" default behaviour should be.
We could add a ifNotEmptyDo: in addition, but I don't see the point.
For ifNotNil: Yes, this too should allow both a 1-arg block and a 0-arg
block. But that needs a compiler change. I looked into that a bit and
gave up after realising how simple
that will be in the new compiler (it's actually already done there).
We should discuss that on Monday.
Marcus
More information about the Squeak-dev
mailing list
|