On 23/06/2006, at 4:55 PM, Matthew Palmer wrote:
On Fri, Jun 23, 2006 at 04:21:41PM +1000, Mark Sargent wrote:
Matt, do you agree with the authors comments regarding the usage of
brackets in chapter 1 (11 0f 85)? I am now wondering if I should
start
getting into that habit? Cheers.
Absolutely. Ruby's ability to drop parentheses when they're not
needed can,
at times, be quite useful in reducing clutter in your code.
However, you
need to know (and remember!) the rules about when you can and can't
drop the
parentheses, otherwise you will get yourself in a whole world of
trouble.
Yeah, I find the same thing for Perl and Haskell: Perl follows
similar rules to Ruby for parentheses (i.e. brackets can be dropped
for internal functions), and Haskell only requires brackets to
override precedence in an expression. It does make code much easier
to read.
--
% Andre Pang : trust.in.love.to.save <http://www.algorithm.com.au/>
_______________________________________________
coders mailing list
[email protected]
http://lists.slug.org.au/listinfo/coders