4 ms·
Elixir and OTP are really nice, but I'm frustrated by the type system, even with typespecs. I finally gave in and started learning Haskell. I would still choose
by stephan83 7y ago
Elixir and OTP are really nice, but I'm frustrated by the type system, even with typespecs. I finally gave in and started learning Haskell. I would still choose Elixir/Phoenix for some web apps though.
- RexM 7y agoHave you checked out Gleam? https://gleam.run https://gleam.run
- lame88 7y agoExpect a long journey if you’re trying to get to the state where you can make a web app. I am making a conjecture here but from my limited but nontrivial experience it seems libraries in the applications ecosystem of haskell apply the most advanced features they know of to solve their problems. That would normally be fine, but they do not abstract away this complexity; due to the type system’s rigor, these choices are propagated to you as the consumer of the library because you have to consume the library in a way that satisfies whatever advanced type features they have. So the end result is that to get anything done like make a basic Yesod web app you have to be at an advanced level. I feel i benefitted from learning the structural and type theoretic aspects (monads etc) of Haskell but I also am glad i ditched it after some time because the investment just did not seem worth it anymore after a certain point. Anyway just my perspective, hope its helpful if you find similar difficulties. Right now I’m checking out Scala as an alternative, but i’ve just started so I can’t offer any comparison other than I know it is less rigorous.
- stephan83 7y agoThank you for the input. Maybe I will never get to the point where I can comfortably make a web app, but learning the language has been a fun experience so far. I've heard good things about Scala and Akka.
- jsjohnst 7y ago> I am making a conjecture here but from my limited but nontrivial experience it seems libraries in the applications ecosystem of haskell apply the most advanced features they know of to solve their problems. Apologies to others for the “me too” reply, but I wanted to let you know you aren’t alone, I also feel this way. It’s intellectual masturbation (without any reward/benefit), IMHO.
- quickthrower2 7y agoHaskell is a funny beast because I get a lot of joy from “conquering” the next level up (like a game) but in terms of productivity I’m not getting a lot done. OTOH in more pedestrian languages I’m using that brain BHP on getting stuff done. I really got into the Haskell thing a while back, going to meetups etc. but getting a job using Haskell is hard unless you’ve got experience already and want to take a pay cut.
- lame88 7y agoAgreed - it certainly is rewarding in itself to get to the next level, but that's precisely it: the means become ends in themselves. I stopped using stuff like Arch Linux a while back for similar reasons.
- quickthrower2 7y agoYep. Tools like Docker and Kubernetes on the other hand, I have found they give you a nice amount of leverage for much easier to understand concepts. In a similar "Workhorse" category I would put Git and Typescript. All of these require some effort to get to know, but they pay off nicely in terms of productivity. Haskell is a pretty decent general purpose programming language, and if used well you can produce nice programs, but the problem is that the library you need will use some clever type system stuff and suddenly you are spending hours trying to understand how it all works. For example I'd be happy doing a lot of stuff in the IO monad with some pure bits to the side where needed. Avoid the free monads, monad transformers, type classes and all that jazz. So use it like an imperative language for the most part.
- regularfry 7y agoThe problem I have with Haskell for getting anything actually done is that nothing I try to do actually works. I mean in the basic "try out the tutorial to learn the thing and be able to get to the end without an error I don't have enough experience to debug" sense. Stack should help with this, but it doesn't when the versions you get (and function signatures of those versions) have changed since the docs were written. Cloud Haskell is an example of this: the tutorial docs are incomplete (the very first command they have you write is wrong, among other things), and they don't specify a stack version so the Hello World example doesn't build with the current snapshot and there's a really odd change to a public API I just can't get my head round. I've had the same experience with Yesod and Scotty too, although not recently - every time I decide it's been long enough for the ecosystem to mature a bit more, I bounce off issues like this which I just don't get elsewhere, and decide to give it another couple of years.
- pdimitar 7y agoEvery time I see how many variants (and flags) the GHC has and I am like "feck no, I'll check it out again next year". But I think it's a culture thing in that community and it won't ever change. That's what one of the things that's kind of making me give up on OCaml as well although there things aren't that bad.
- lame88 7y agoI'm not familiar with Cloud Haskell, but I can attest that documentation and information availability in general have become a huge priority for me recently after getting burned by lack of it in recent years. This is actually very tricky to nail a sweet spot in, because it almost requires that a technology be currently popular, yet stable. There are long-lived Haskell libraries that have poor documentation and Haskell is rare enough that there aren't often answers to common pitfalls on StackOverflow etc. Ruby on Rails still has ongoing releases, but its popularity has declined and apparently so has its sources of community information beyond the official docs, which only cover so much. And then you have the immature, fast-moving JS ecosystem. Ironically for these reasons I could easily see myself choosing Java for projects in the near future; I don't like the language, but I've learned that the problems I have with Java are not my biggest problems as a professional engineer anymore.