Hacker News new | ask | show | jobs
by _greim_ 2807 days ago
One thing I've found with functional programming (Elm) is that writing JS requires constant mental effort. E.g. dynamic types, mutations, side effects, state. In Elm all of that neural machinery becomes obsolete, but your brain doesn't just magically switch it off. So Elm feels hard at first, until the concepts sink in a little bit and your brain re-wires itself.
1 comments

Yes, this very much describes my experience of working on a gigantic Backbone app while using Elm at home. Work has gotten harder because I’m (rightfully) paranoid about mutation and unable to trust the (fallible) conventions of OO JavaScript.
Similar situation here – I've found that using Typescript and declaring (most) variables const already goes a long way, although the peace of mind still isn't quite the same.