3 ms·
> If you ever forget to close a string or a function definition argument list, or anything along those lines Wouldn't the compiler find this and the editor mar
by mseepgood 5y ago
> If you ever forget to close a string or a function definition argument list, or anything along those lines
Wouldn't the compiler find this and the editor mark it as a compilation error?
- blendergeek 5y ago> Wouldn't the compiler find this and the editor mark it as a compilation error? Syntax highlighting happens in real time. Compiling (at least in my editor), only happens when I say it should.
- klyrs 5y agoDepends on the language, depends on the syntax highlighter. I've seen syntax highlighters that don't make un-terminated python strings look wrong, because the highlighter knows that strings can't span multiple lines (others will give a red squiggly). Some languages give really cryptic errors about the next line -- which gets you in the right neighborhood, good enough for me, but not so friendly for newbies.
- toast0 5y agoI don't know about the person you're replying to, but I'm still old school and don't integrate compiling with my editor; maybe some day it will use a language server and get that for free, but for now it's just language specific configuration that does an OK enough job. When I write a string and the rest of the screen is string colored, it quickly notifies me that I messed up something.
- yunohn 5y agoWhy wait for the compiler? You’re basically saying linting is useless versus compiler errors…
- jonnycomputer 5y agoCompiling isn't always fast. Besides, incorrect syntax will usually interfere with the IDE's code inspection; fix-fast, fix-early.
- u801e 5y agoIt depends on the compiler or interpreter. Some don't give very informative messages and indicate a syntax error on a line that may be one or more lines after the actual error. But the syntax highlighting gives an immediate indication that something isn't right.