J Haas wrote:
> On May 27, 10:21 pm, James Britt <james.br... / gmail.com> wrote:
>> 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.

No, it's a signal to the human reading the code as well.

> 
> Code speaks louder, right? The whole point of writing code is to tell
> the interpreter what you want it to do,

I'm with Harold Abelson and Gerald Jay Sussman on this point:


"Programs must be written for people to read, and only incidentally for 
machines to execute."


> 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.

But we're back in the realm of subjectivity regarding what is "bare 
minimum of code" and "superfluous".  Ruby could be made quite terse, but 
that's not a proper goal.

There is value in redundancy, and the trick is to find the right 
balance, not to eliminate it completely.

Also, having more or less free reign on white space means I can express 
non-computational information more easily by using unusual white space 
to offset chunks of code or parameters to tell the reader, "Look, this 
is important" at a glance.

Programming is a form of technical writing; judicious use of white space 
is a critical means of communicating with the reader.


      Some times I really do
      want to do this.

      This is a powerful option.


> 
> 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.

That's the same argument I hear from Ham'l Qaeda; "Just give it more 
time and you'll be enlightened in your ways".   :)


My experience says otherwise



-- 
James Britt

www.jamesbritt.com           - Playing with Better Toys
www.ruby-doc.org             - Ruby Help & Documentation
www.rubystuff.com            - The Ruby Store for Ruby Stuff
www.neurogami.com            - Smart application development