On 7/11/10, Robert Klemme <shortcutter / googlemail.com> wrote: > On 11.07.2010 13:32, Caleb Clausen wrote: >> On 7/11/10, Robert Klemme<shortcutter / googlemail.com> wrote: >>> IMHO this is not feasible: "if<condition>" is almost always followed by >>> a line break. And think about >> >> Yes, but 'if' itself almost never is. > > Unfortunately the word "almost" makes this unusable for creating a > parser. How do you want the parser to decide if the case at hand is one > of the rare cases? Even if it would be feasible this sounds like an > awful hack and I'd rather not make parsing more complicated (and thus > slower) as it is today. The syntax change I proposed requires forbidding a construct which is currently legal but rarely used and considered to be poor style. What is wrong with that? In those few cases where someone decided to separate an 'if' from its condition with a newline, the code would have to be rewritten (inserting a backslash to make the newline soft is the easiest way). Such constructs should be rewritten anyway, for purely stylistic reasons. This new feature, like most, will make the parser ever so slightly slower. The delta is tiny and not worth mentioning. And it will make the parser a little bit more complicated; however, there are already many special cases and complications in the parser. One more is not a big deal. The philosophy of ruby's syntax overall is to make the parser complicated if it makes life easier for the user. I think this change at least ought to be considered under that criterion. Now if you want to argue that Jan's proposal is esthetically unpleasing, I won't really disagree. But just leave it at that. I hate it when people try to throw up a lot of rhetorical chaff when their real, and only valid, objection amounts to a subjective judgment call.