From: "M. Edward (Ed) Borasky" Date: 2006-08-18T22:43:46+09:00 Subject: Re: Syntax checker wtf? Austin Ziegler wrote: > On 8/18/06, Firstname Surname wrote: >> I think the syntax checker could be a little more verbose, and I don't >> think it would take much work. > > It'd take more work than you think. See, you've actually got several > issues that you keep repeating in your example code, and that could be > the problem. The use of a high-quality editor and good practices will > also help. > > Here's the real trick that you're forgetting that makes it a bit harder > for Ruby to deal with what you're talking about: it is not just > line-oriented, it is expression oriented. Expressions may be terminated > either by an unambiguous line ending (that is, it doesn't end with a > continuation character \, comma, period, or an operator that says that > the next item will be on the next line) or semicolons. I think what's most troubling to the original poster is something that I have such a problem with that I more or less refuse to use it. That is the pseudo-flexibility offered by having "open syntactic elements" designate that the next line continues a statement or expression, rather than forcing an error as older languages did. In short, if I type a = (b + to an interpreter, I want it to complain that I'm missing an operand and a right paren, *not* go blindly ahead expecting c) / sqrt(7**15 ) - (olive**oil) Yes, that's a contrived example, but as far as I'm concerned, if end of line terminates a "statement", then continuation of a line should require an *explicit* continuation designator, such as "\".