Hi,
My question is completely off-topic and unrelated to Elm per se of course, but I thought I’d ask Elm programmers for feedback still.
I’m kinda frustrated with my current tech stack and looking at alternatives.
I’ve been programming on and off for about a decade, as a self-learner.
I wouldn’t call myself a great programmer and work alone, so if I dig myself into a hole, no one’s gonna save me
Until recently, I resisted the notions of functional programming, maybe out of laziness or close-mindedness.
Anyways, I think I’m realizing I really enjoy the constraints of functional programming. An imperative language is just too powerful and makes it too easy to shoot oneself in the foot.
Imperative code did seem more appealing to me at first because I thought it made more sens to stay close what a CPU would do rather than introducing a huge layer of indirection.
I also like the testing benefits FP seems to provide: I always hated mocking, stubbing and having to rely on framework internals to do testing.
Static typing is a godsend once your project starts to get big. Also it enables dramatic tooling improvements. I like the idea of being able to refactor fearlessly knowing a compiler has my back. Snappy feedback is important for me too, I find waiting for stuff to happen frustrating.
I prefer one way of doing things (as in Python), rather than in many ways (as in Ruby).
So I very much enjoy Elm for all of that, and I think it may well represent all I want from a language. So I could see myself investing time into learning this language.
I’m thinking about going all-in with the functional paradigm, so looking at different technologies for the backend and I’m wondering if some of you have any feedback on that?
I gathered Richard Feldman (who made me curious about Elm via YouTube) was into Haskell at first, then switched to Rust. In a talk, he mentioned compile-time type safe SQL with a Haskell backend which definitely peaked my interest. I’d be interested to hear about a reason to switch to Rust from Haskell.
The Phoenix framework possibly looks like the best option for an FP backend. Problem is the lack of types from Elixir: I already know I don’t want to go that route.
So to sum up, the things that really click with me are:
- fast feedback loop while developing
- fearless refactoring
- ideally good editor support
- reduce runtime exceptions as much as possible (hello null pointers)
- simple rather than easy, even if it means more “boilerplate”
- a decent web + SQL ecosystem since my time is limited
- I prefer writing SQL, but an ORM-like tool can be useful for productivity and expressivity (and encapsulation)
- I don’t care about syntax
My experiences and what I like/didn’t like are:
- ruby: great for scripts, poor refactoring and editor experience. Don’t like meta programming, too easy to overuse or badly use.
- rails: great for RAD, but painful as the project grows and requirements change. Too much magic.
- golang: great dev experience, hasn’t fixed the null pointer pb. Web + SQL ecosystem isn’t that great IMO
- java/spring: Dependency injection breaks the benefits of the static typing IMO. Great tooling/editor support. Slow feedback is a major pain (jvm startup). Also most java code feels over-engineered to me (see the spring-boot-security architecture for instance, crazy and a bad design gets in my way). Annotations would be useful if not overused, makes the code execution path unclear.
- angular/typescript: dynamic features break the static compilation advantages again. Very complex architecture and not a fan of the testing story.
- vue/react: I wasn’t convinced. Although Elm inspired, I think introducing a system like a redux store does not feel right on those systems, quite a lot of boiler plate with no garanties, easy to make mistakes and introduce super weird bugs and bad refactoring abilities.
- java/quarkus: maybe will have a good dev experience. Could be interesting if coupled with Kotlin (which seems to be a better Java with no downsides)
- clojure: REPL driven development is an interesting concept. The lack of static typing hurts refactoring and tooling though. And also makes introducing runtime errors much easier.
- nodejs+typescript: interesting combo and SQL tooling (though a little rough). Poor null handling (Swift or Rust seem to do a much better job at this)
- svelte: looks very interesting but project is little young. Probably Elm’s only decent alternative for me.
So there you have it
Usually, I tend to just dive in and make my opinion but this time I think the FP landscape is too large for me to do that and I need a little guidance.
So I hope some of you went through the same process and have an opinion on the matter. I’ve looked briefly at Gleam and Elchemy. Both look interesting but a little scary to adopt since in such a niche.
Thanks for the feedback and have a great day