What to believe?
stephane ducasse
stephane.ducasse at free.fr
Wed Jun 27 13:10:21 UTC 2007
Hi andreas
> That is not necessarily the case. One can make an equally good
> argument saying that "foo ifTrue:[...]" should expand to "foo
> ifTrue:[...] ifFalse:[foo]" which is coincidentally true for
> ifNil:ifNotNil: and *should* be true (and I'm glad we fixed this in
> Croquet) for ifEmpty:ifNotEmpty:. In other words if it is the case
> that:
>
> 42 ifNil:[...] => 42
> #(1 2 3) ifEmpty:[...] => #(1 2 3)
>
Can you elaborate more on why it should be true for ifEmpty:?
> then it seems quite consistent to have
>
> false ifTrue:[...] => false.
>
> (not that I'm proposing to change this btw, since it would break a
> whole bunch of stuff but it's perfectly consistent with other
> semantics that are generally deemed "intuitive")
>
> Cheers,
> - Andreas
>
>
More information about the Squeak-dev
mailing list
|