3 ms·
Alan Perlis famously said, "A language that doesn't affect the way you think about programming, is not worth knowing." A lot of times you can learn something i
by ktRolster 10y ago
Alan Perlis famously said, "A language that doesn't affect the way you think about programming, is not worth knowing."
A lot of times you can learn something in a new language, and then bring it back to other languages. For a simple example, programming in Python might give a programmer the insight that she doesn't need to write a factory for every class; or writing in Haskall might give him the idea that immutability is a good idea.
Then when the programmer returns to her original language, she can use those techniques, adapted to the original language.
- kerkeslager 10y agoThis is definitely a good reason to learn new languages, but it does have its limits. Examples: 1. Erlang has done a lot of work to make their actors lightweight. In Erlang it's not only common to spawn a new actor for everything, but it's generally a good idea that organizes your code flexibly and results in transparent scaling onto multiple cores. On other systems that support actors, the actors aren't as lightweight, so while they're useful for organizing your code in some cases, using them pervasively will result in cripplingly slow performance and, depending on the language, completely exhausting thread/process resources. 2. Some schemes support CPS conversion and TCO, which allows you to use recursion at relatively little cost and without worrying about exhausting the stack. However, in languages that support TCO and not CPS conversion, it takes some work to be sure that your recursive calls are tail calls. And in languages that don't do either CPS conversion or TCO, deep recursion performs poorly and infinite recursion breaks outright. This is why it's not only important to learn patterns in new languages, but to learn how those patterns are implemented under the covers.