[ANSI-Smalltalk] Re: A list of interesting methods, ifNotNil:
Eliot Miranda
eliot.miranda at gmail.com
Fri Sep 26 15:08:27 BST 2008
On Thu, Sep 25, 2008 at 8:43 PM, Richard O'Keefe <ok at cs.otago.ac.nz> wrote:
> [snip]
> Me, I've always considered it better style to do
>
> name := expression.
> name ifNotNil: [...].
Slightly inaccurate. It is really
| name |
...
name := expression.
name ifNotNil: [...]
vs
expression ifNotNil: [:name|...]
Being readably concise, free of boiler-plate and economical with vertical
real-estate are far better style than their converses, IMO.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.openskills.org/pipermail/ansi-smalltalk/attachments/20080926/7b4e76e2/attachment.htm
More information about the ANSI-Smalltalk
mailing list