What are the easiest FP language to learn ? I checked multiple time Haskell but it seems really hard
What are the easiest FP language to learn ? I checked multiple time Haskell but it seems really hard
That said, you might want to check out OCaml for general purpose programming. Super fast compiler, great performance, can target both native and JS.
It is easier to use than Haskell due to defaulting to eager evaluation (like most languages) strategy instead of laziness and being generally more pragmatic, offering more escape hatches into the imperative world if need be. Plus great upward trajectory with lot's of cool stuff like an effects system and multi-core support coming.
Real World Ocaml is a decent resource: https://dev.realworldocaml.org/
Any tips on backend frameworks to look at? I need to write a small websocket service for a side-project and have always wanted to try OCaml. I came across https://github.com/aantron/dream.
I do highly recommend starting with one of the Dream example projects just to lower the barrier to entry on the tooling side.
You can also use Rescript (compiles to very readable Javascript), which is the OCaml type system with more familiar syntax and some of the complexity shaved off.
The other part is that I have a good impression of the person/people behind it and could see it sticking, for whatever that's worth.
Just wanted to add that both websockets and indexed-db is being worked on by members of the community. I'm hopeful we'll have them ready for the 0.2.0 release in December, alongside preliminary nodejs support.
Since the 0.1.0 release, we've added support for local- and session-storage, which was another often-requested feature for Elm.
Websockets were dropped?? It seems support was introduced with subscriptions in Elm 0.17[1] as a great feature?? How did that happen?
I believe it's quite possible to support websockets with the current language features, though, and I hope that websockets will be ready for Gren along with the 0.2.0 release in december.
Elm preferring purity is its practicality.
This means that you can learnt he basic concepts of operating on data with pure functions, pattern matching etc. Plus it's a nice language that is great for building a lot of things (Phoenix is a great web framework).
Once you've got some of that background of how you build functional programs rather than OO, moving to something like Haskell or Ocaml is a bit easier because it becomes more about understanding how to declare types to keep the compiler happy and less about the fundamental program design stuff.
FWIW, I tried Elm, Haskell, PureScript, Elixir.
For me, learning Racket was not too hard. The offical learning materials are excellent, although they are also meant for programmers starting from zero. For me that meant that I occasionally skipped over parts I considered "too easy" only to be confronted by my hubris later.
For me, what makes lisps easier than Haskells is that lisps are multi-paradigm. So you can write a more imperative implementation of whatever you're doing right next to the "proper" functional one to get things to click, and also to identify those elusive merits of functional programming.
I wouldn't describe the Racket community as "vibrantly alive", but it's definitely still moving along. And the knowledge is very transferrable to other lisps and schemes. Next on my list is Carp, for example. And if you (choose to) use Emacs you'll reap even more rewards from the knowledge transfer.
I've heard that an Elm-to-native app compiler is in the works somewhere, which IMO is very exciting.
People are still working on Elm ecosystem packages, so I think that is evidence that it isn't dead. But it isn't as "alive" (or perhaps... hectic) as the JS ecosystem of course.
Probably Purescript in the frontend (also hard) or Scala on the backend (easier, because you can also write impure code).
Elixir is more popular these days, but I still prefer Erlang’s syntax. Minimalistic, helps me “think” Erlang instead of imperative/OO.