"Firstname Surname" <rubyforum / wendlink.com> wrote in message 
news:a466c7740a34c06801792de17814b637 / example.com...
>
> I think the syntax checker could be a little more verbose, and I don't
> think it would take much work.

    There's a standard response to comments like this.  The code is open 
source, so if you really think it's that easy, why don't _you_ do it?  It 
works better for wikis...


> The trouble I had was with a line that had an extra '.' like:
> @entry = Entry.find(params[:id].
> instead of
> @entry = Entry.find(params[:id]
>
> and another error that i think was just a missing bracket maybe like
> @entry = Entry.find(params[:id
>
> I've used many different languages with various levels of syntax error
> help, but never one this bad. I just wrote a quick script to remove
> functions from 'def' to 'end' in order and check the syntax over, thus
> quickly finding which function the error is in. This is a lot better
> than looking through a couple hundred line controller file. If I can do
> this in 10 minutes, I can't help but think it's just laziness on the
> part of the syntax checker not to provide at least hints where it thinks
> the problem might be.

    Okay, judging from your examples, I think the problem is that you're 
hitting  a rather sore spot in the Ruby interpreter.  I've done a few 
examples and it looks as if the Ruby parser does a lazy evaluation of 
parenthesized (and bracketed) things.  It just so happens that these are 
exactly the kind of mistakes you make so they really seem to bite you.
    The only thing I can suggest is that you close all your brackets and 
functions before filling them.  So, while editing, you'll write things in 
this order:

def some_function
end

    ..and then...

def some_method
    @member[]
end

    ...and finally...

def some_method
    @member[@other + 2]
end


> I understand that ruby is flexible (I'm not not sure this is a merit
> when using for a large web app), but the checker could easily check
> based on 'standard' expected syntax and be more helpful about error
> location 99% of the time.

    Well, you're welcome to try Django but you should be warned that the 
Python syntax is every bit as flexable as Ruby, so if you really don't 
think that's a merit for a large web application...
    Python software is generally more mature than Ruby (probably because 
it's much older) but the syntax is less consistent (perhaps because it's 
much older?), so it's a trade off.  You'll have to decide what's important 
to you and go from there...
    Good luck!