2 ms·
Have needed to get people working on Scala code at work, and introducing the concepts in JS first is the right approach for most junior devs, I think. Existing
by jim-jim-jim 4y ago
Have needed to get people working on Scala code at work, and introducing the concepts in JS first is the right approach for most junior devs, I think. Existing familiarity with the lang is one thing of course, but it's also so nice to just pop open a console in the web browser and just talk through concepts without fretting over jdk versions and sbt and whatever.
Multiple colleagues swear by this book in particular, but I don't know if it needs to be read cover to cover. Reassuringly enough, much of the foundational content regarding immutability and higher order functions seems like it is already common knowledge to younger devs.
I think the biggest conceptual leap from the FP lite that is already practiced in modern JS to the "hard FP" of Haskell and Scala is the generalized approach to contexts via functors/monads. Luckily one such context already exists in JS in the form of the list. Implementing Option/Maybe using a single item list, and composing operations using the existing map and flatMap methods is a nice exercise that paves the way to the happy path only style of programming of the more advanced langs.