|
|
|
|
|
by jasonwelk
3238 days ago
|
|
Count me among the converts who moved from Elm to ClojureScript, and I'm loving the FP as much as ever. I like quite a bit about Elm, but the main issue came down to productivity and workflow. You can do the same things in either language with the proper time, but Elm requires a lot of extra code and effort to so some simple things, and much is not obvious. When discussing things with other Elm developers, they would tell me "there's not good way to do that now, but here are some hacks to get it to work; hopefully this will change some day." And I hit that time and time again. If you've used Elm for a long time, maybe you already know all the hacks, but I found it disruptive to my flow. With ClojureScript, I do spend a little more time dealing with the occasional console error, but this is a lot less time than having to find the tricks to do certain things in Elm. I can appreciate the goal of purity and rigid typing in Elm, but it definitely came at a cost in development time. My ClojureScript apps are about half as much code and at least half the time spent writing them. One of them currently has about 2000 users and not one has sent a report of any runtime crashes, so I think the frequently-cited horror of runtime problems is somewhat exaggerated when justifying the strong restrictions Elm imposes on the development process (and for what it's worth, you still get runtime exceptions in Elm, just maybe a few less than in other languages). Someone recently posted in the Elm Slack a screenshot from the Chrome console of a live production app with many users that started throwing runtime stack overflow errors on a recent version of Chrome. Apparently it was caused by another of these non-obvious problems that required he break up certain lists into concatted lists instead, which was not idiomatic but necessary for the Elm runtime. Anyway, that's just my $0.02. With ClojureScript I still get all the functional idioms and immutable data and persistent collections, and it has a deeper and more interesting core library for FP that really lets you abstract data manipulation in creative ways, which is a great bonus. |
|