[squeak-dev] ifTrue: vs. ifFalse:
asqueaker at gmail.com
Wed Oct 19 00:57:38 UTC 2011
> For those of us who read those sentences in two parts: "x ~= y" and
> "ifTrue:...", the "not" being included in the comparison is preferred as it
> tells us up front what the comparison is about. Then the second part tells
> us what is being done about it. I hope helps and makes some sense.
That's a great thought, thanks. It made me remember, a couple of
times (cough), I have focused too quickly on the first-part (the
condition) and then the second part (the what-to-do) so quickly that
missed the middle part (the "ifFalse:") and made me mis-interpret the
code momentarily because I assumed it was the true case..
More information about the Squeak-dev