[squeak-dev] ifTrue: vs. ifFalse:
Bert Freudenberg
bert at freudenbergs.de
Tue Oct 18 08:58:53 UTC 2011
On 18.10.2011, at 05:11, Chris Muller wrote:
> (From vm-dev list)
>> But I much prefer foo ~~ bar ifTrue: than foo == bar ifFalse:.
>
> Hi Eliot. May I ask why you prefer the former over the latter?
>
> I'm interested because I'm working on an application where the folks
> involved prefer something similar, to where they write (expr) not
> ifTrue: [ ] rather than (expr) ifFalse: [ ].
>
> I know you wouldn't do that but your statement definitely piqued my
> surprise and curiosity.
Maybe this is a clue: very few other programming languages have an "else"-case without a preceding "if true". So maybe for people versed in multiple languages the ifFalse: feels wrong?
I personally like "expr ifFalse:" better than "expr not ifTrue:". And I read "~~" as "not identical" which also has a mental "not" in it, so I prefer "== ifFalse" :)
- Bert -
More information about the Squeak-dev
mailing list
|