3 ms·
This 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 lightweig
by kerkeslager 11y ago
This 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.