Another new idiom for conditional testing?
Dan Ingalls
Dan at SqueakLand.org
Wed Oct 3 15:30:55 UTC 2001
"Richard A. O'Keefe" <ok at atlas.otago.ac.nz> wrote...
>The main problem with
> expr1 and: [
> expr2 and: [
> ...
> exprn ... ]] ifTrue: [...]
>is that the pretty-printer destroys the layout. That could be fixed
>by improving the pretty-printer.
This reminds me that I have (twice) in the past taken the trouble to define
and:and:
and:and:and:
and:and:and:and:
and:and:and:and:and:
These eliminate the awful nested brackets, and get nice treatment from the pretty printer as well. It's a real convenience.
- Dan
More information about the Squeak-dev
mailing list
|