On May 27, 10:21 ¨Βν¬ ΚανεΒςιτΌκανεσ®βς®®®ΐηναιμ®γονχςοτεΊ
> FWIW, daring people to dispute what is ultimately a matter of opinion is
> not terribly productive.
Yeah, I realized that as soon as I posted. Sorry 'bout that. But look
at it this way.
In the example from AuthLogic I posted, which is real-world code and
not at all atypical, just under one-fourth of the non-blank, non-
comment lines consist of the bare word 'end'. The 'end' keyword
doesn't _do_ anything. It's just a signal to the parser that here is
the end of the block... and with canonical indentation, this is
something the parser is quite capable of inferring on its own. 'end'
is redundant.
Code speaks louder, right? The whole point of writing code is to tell
the interpreter what you want it to do, and the whole concept of
'expressiveness' is based on being able to tell the interpreter what
you want it to do with a minimum of overhead. Let's tell the
interpreter to do something:
1.upto 10 do |x|
p x
Stop! Don't write another word. At this point, you've told the
interpreter _exactly_ what you want. Using the bare minimum of code,
you've expressed with perfect clarity your intent. Anything you write
beyond that is superfluous. And if the language _requires_ you to
write this extraneous code, it's not as expressive as it could be.
I know it looks funny to a lot of people. It looked funny to me the
first time, too. As I said, my reaction when I first learned of
significant indentation was the same reaction I've seen from lots of
developers I've told about it: "what, are you kidding?" But it makes
sense. After a day or two of playing around with it, you'll find that
it becomes second nature.