3 ms·
I think this is something you naturally get better at. You start to resize that languages have similar ideas, but different representations. Is this a problem
by shepherdjerred 4y ago
I think this is something you naturally get better at. You start to resize that languages have similar ideas, but different representations.
Is this a problem that is having a significant impact, or just an annoyance?
If you aren’t using an IDE, then you definitely should start. Any good IDE for the languages you mentioned will provide lots of help with incorrect syntax. Be sure you have it properly configured so that it can give you as much help as possible.
I program in many different languages and I always have to search for things when switching to one I haven’t used recently. I view this not as a bad thing. Google exists for this very purpose, and there isn’t too much benefit to intentional memorization.
Lastly, the book The Programmers Brain touches on how to remember syntax among other things. It might be useful.
- shepherdjerred 4y agoTwo things I forgot to add. Most programming languages have ‘linters’. Linters analyze syntactically valid code for mistakes of different types. Mistakes can be something like you forgot to use a variable you created, to you’re performing some operation incorrectly. Linters are useful in general, but in your case they can help you write better code when you aren’t as familiar with the language. Go has a project called golangci-lint, while TypeScript has eslint. The second thing is code formatters. Every language has its own formatting style, so it can be nice to have a program that does the formatting for you. Go has gofmt, and TS has Prettier (among others). These tools add some complexity, but if you set these up you’ll have some extra guard rails as long as you remember to run them, or even better run them as a GitHub Action.
- bfung 4y agoFor OP, I switch between Java, Ruby, python, bash, read scala, rust, Haskell, go… And the advice here in this comment chain is spot on: 1. Know the underlying concepts, all programming languages are “same” after awhile (ex: object.prop, function calls, global vs non-globals, lambdas/anon funcs. 2. Use a compiler and or linter to catch syntax errors and don’t worry about memorizing it - knowing how to read the output/error msg and solving the issue is more important
- viraptor 4y agoSame here, different set of 8 or so languages I cycle through. I stopped caring. From time to time I'll make a silly mistake like using "def" in rust instead of "fn". The highlighter or the compiler will shout at me, I'll fix it and move on.