Syntax checker?

  • Thread starter William E. Rubin
  • Start date
W

William E. Rubin

Regardless of what the example does, my point is, how should it warn you?

By saying "foo might be undefined at line 2351".

When you ask it to. I'm not saying that such warnings should be output
by default.
If it worked just by looking at whether it _may_ be undefined, then
surely it'd always warn you in the above situation?

Assuming that you asked it to, then yes. Or, potentially, there could
be a way to state, within the source code, for the benefit of this new
tool, that "Yeah, I already know that it looks like 'foo' might be
undefined on the next line (or in this function, or in this file).
Don't bother telling me about that".
I can see that it would probably help in a lot of cases

I agree.
but it would be
an annoying gripe in a lot of the more complex cases, which is where Ruby
shines.

Then don't use it in such cases. Or, if you find it useful in some
complex case except for such annoyances, use it, but invoke the "Yeah,
I know" option described above.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Members online

No members online now.

Forum statistics

Threads
474,201
Messages
2,571,048
Members
47,646
Latest member
xayaci5906

Latest Threads

Top