Re:Ask HN: How do you switch between programming languages?
by shepherdjerred on Tuesday September 20, 2022 @02:59AM
(#32908577)
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.
Re:Ask HN: How do you switch between programming languages?
by zhxshen on Tuesday September 20, 2022 @10:28AM
(#32912105)
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.
Re:Ask HN: How do you switch between programming languages?
by shepherdjerred on Tuesday September 20, 2022 @08:13PM
(#32919476)
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.
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").