From: Paul Brannan Date: 2008-04-09T00:02:57+09:00 Subject: Re: syntax request On Tue, Apr 08, 2008 at 02:23:26PM +0900, David A. Black wrote: > It's very weird to me that given a line that consists just of "puts > object", it's impossible to know whether or not the program is going > to puts object, without knowing whether or not the first character of > the next line is a dot. Even though (I hope) the stray dot thing won't > be used very much, it means that we can now *never* really interpret a > line of Ruby code, based on visual scanning, without looking at the > first character of the next line. I think that's a net loss. IMO a line of code should almost never be visually inspected apart from the rest of the code in a method. A method should be short enough that looking at the method as a whole should not be a large burden. If this can't be done, the method is too long. At the same time I'm against the leading dot notation, because it promotes method chaining, which in my experience has been more problematic than helpful. Much of the time it feels as if programmers are trying to make up for lack of keyword or smalltalk-style argument lists through the use of method calls. I do sometimes use method chaining to silently pass state from one operation to another without explicitly creating an object. When I do, however, it often feels that there should be a better way to accomplish that goal. Paul