----- Original Message ----- 
From: "Yukihiro Matsumoto" <matz / ruby-lang.org>
To: "ruby-talk ML" <ruby-talk / ruby-lang.org>

"puts (a+b).abs" as "(puts(a+b)).abs" really made me mad.
----------------------------

Yes, but was this true with other methods?

  'one:two:three'.split (':').each {|x| puts x}

It seems to me that we expect different precedence from 'puts', for some
reason.

(That code does look a little funny, though.  Of course, I like to put
spaces before the `.' when I'm chaining method calls, but that's just me...)

In any case, since this is the Way It Is now, it seems that our
documentation should probably change to reflect this, especially our
introductory materials.  We may not tend to think of whitespace as syntax,
but it was (to a small degree) before, and is even moreso now.  Someone
coming from C is bound to be surprised by this; it even keeps biting more
experience Rubyists.

<sleepy_ramble>
It seems that most of the issues around whitespace involve trying to
determine the beginnings and ends of parameter/argument lists.  On the other
hand:

  class Foo end

Without a newline in there, this generates a SyntaxError; newline (or a
semicolon) is part of the syntax.  Why is this?  I thought Ruby had no
statements, only expressions.  Well, they are some of the statementiest
expressions I've ever seen.  Why can't I do this?

  foo.something( with, lots, of, long, arguments... )
     .whatever( with, even, more, long, arguments... )

Because whitespace is syntax.  (Yes, I know about `\' at the end of the
line.)
</sleepy_ramble>

Chris