Hacker News new | ask | show | jobs
by zhxshen 1371 days ago
There are plugins for vim/emacs/vscode to aggressively lint/highlight various errors as you type and/or save.

Since two of the languages you've mentioned are compiled, they should be giving you specific line/column/error information on syntax errors. If it's taking you a day to de-cipher explicit error reports from the compiler, it's probably time to better familiarize yourself with compiler lingo (most people recommend "the dragon book").

1 comments

Considering he’s an amateur programmer I doubt he wants to delve into compilers, which is a hard topic even for CS students.

With that being said it is a great thing to know, but likely unnecessary unless you’re very serious about programming.

Didn't tell him to write one from scratch. Just suggested boning-up on the lingo: grammars, tokens, lexing, parsing, etc. An understanding of the first 2-3 chapters would be more than sufficient.

Getting a firm grasp on such things made every language I deal with "click". Knowing how the sausage is made--if only at the kindergarten field-trip level--brings all of the trade-offs language designers have to make into relief. With this knowledge, you'll know where the sharp corners are to begin with--the ones that were unavoidable due to the limitations of the medium. This is much better than beating one's head against the wall over a syntax error while being pissed at the language for not being a miracle.

I agree that this is a great thing for any serious programmer to do. It depends on the person though. Someone that codes for fun would not want to spend any amount of time in a compiler text.