* Sean O'Dell (sean / celsoft.com) wrote:

> I tried using this expression:
>
>     number++
>
> ....which isn't allowed in Ruby, I came to realize...but before I did,
> I got an error that pointed to syntax in the middle of the next line
> of code about 2 actual lines down.
[..]
> Why does Ruby do that?  Is there a setting or something that fixes
> that?  I am using Ruby 1.6.4.

It's an effect of how parsing works, especially how automatically
generated parsers work.  You get the same effect in other languages;
bison, yacc and friends are not aimed at producing friendly error
messages, since it's actually very difficult to detect a lot of them.

The only language I know if that provides decent parse error hints is
Perl, and that's only because some madman actually hand-wrote the
parser.

-- 
Thomas 'Freaky' Hurst  -  freaky / aagh.net  -  http://www.aagh.net/
-
"No job too big; no fee too big!"
		-- Dr. Peter Venkman, "Ghost-busters"