> James Britt: Ruby assumes the
> developer is a grown-up. If you're newbly enough to make trivial syntax
> errors, noone's forcing you to use the language.

Yeah, that guys sounds like a lot of fun at parties.

Daniel Martin wrote:
> Robert Klemme <shortcutter / googlemail.com> writes:
> 
> This seems to me like it would be a simple addition to the ruby
> parser, to mention the line number of the thing it's trying to close
> when expecting tEND, or ']', or some other nested thing that can go
> off the end of the file.

Bingo, that sounds like an awesome idea. I've seen the 'possible runaway 
expression' type errors in a bunch of compilers starting with Borland 
turbo c++ in '93 that used to say things like 'possible unterminated 
string on line x' etc. I understand that ruby doesn't have line 
termination and is expressions, but I don't get yet why the compiler 
couldn't tell you the line where the unterminated expression started.

> IMHO you're greatly underestimating the effor.  I guess even for perl it
> was not "a simple addition" - and from what I can see a lot more efforts
> were put into perl vs. ruby.

Would it really be that difficult to say 'unterminated expression 
started on line 10' rather than 'syntax error - last line of file - go 
fish'?


> I get messages like this occasionally. I've found that a good editor is
> the most helpful thing in finding these errors. I use TextMate on my 
> Mac.

Thanks, this is a big help, it took me awhile to figure out the 
keystroke for auto indent in Textmate.

-- 
Posted via http://www.ruby-forum.com/.