4 ms·
This programmer can't code with taking the constraints of the program's environment into consideration. After learning an unrelated programming language he isn
by bhaak 7y ago
This programmer can't code with taking the constraints of the program's environment into consideration.
After learning an unrelated programming language he isn't able to write idiomatic code in a different programming language with a different paradigms.
That's like being depressed when wanting to curse in English as the Russian curse words are much better but when translating them into English, they lose a lot of their appeal.
This programmer should learn that you shouldn't fight the basic premises of a language. That leads sometimes to ugly code but this often is still the best you can do within this particular language.
Also the next programmer to maintain this code will be much happier.
- beatgammit 7y agoThe main thing I learned when learning Functional Programming was that there are multiple ways to solve the same problem, which forced me to look at the data and output first instead of jumping to the syntax to get intermediate results. A program isn't a set of conditionals, loops, and objects, it's a transformation of data from one form to another. Before FP, I would implement a compiler as a massive state machine. In FP, I think more in terms of small functions that work together in a stream, and the state machine is implicit. With declarative programming, I think in terms of defining the grammar. I don't use FP techniques for everything, but my whole way of approaching a problem is different because I know that other options exist. Sometimes I'll use a for loop, other times I'll make a recursive mapping function, it really depends on which solution is simpler and less likely to have bugs.