4 ms·
I got into functional programming by programming in Scala.. this allowed me to begin to decompose problems that I would have normally used a bunch of hacky lo
by cmollis 4y ago
I got into functional programming by programming in Scala.. this allowed me to begin to decompose problems that I would have normally used a bunch of hacky loops using the type system and transformations like flatmap, fold, map, etc. This really becomes useful when dealing with async compositions.. which Scala has excellent support for. I'm not an 'expert' at Scala (or anything for that matter), but this also helped me greatly when moving into Rust (which also has excellent functional capabilities and is similar to Scala in that way, IMO).
- cmollis 4y agoI think the mindset shift is when you stop dealing with single instances of anything and begin to think about their groups, relationships, constructions, data flows.. functional programming (and immutability) allows you to (eventually) write things faster.. you have to play around a lot with lists of things before it starts to click in.