Specifically, I’m interested in BEAM, but I’m not sure if I should go for Elixir or Gleam. What seems cool about Gleam is that it has static typing.
I have no experience with functional programming at all btw
Specifically, I’m interested in BEAM, but I’m not sure if I should go for Elixir or Gleam. What seems cool about Gleam is that it has static typing.
I have no experience with functional programming at all btw
Rust is not fully functional. But I am legally obligated to recommend it any time I can.
Jokes aside, this doesn’t apply to you, since you seem to actively learn functional programming. But for people that are scared of it, rust looks like “normal” languages, but has tons of features that can be attributed to functional programming. Even more so if you avoid using references. You can easily “mutate” objects the functional way, by passing the object to the function, and the function creates a new object with just some value changed.
It has algebraic data types. Function pointers. Iterators. Pattern-based match statements. Don’t have class inheritance. Inmutable by default. Recursion. Monads. And probably other FP features that I’m missing.
It has basically every functional feature while having familiar syntax.
It’s also extremely easy to install. Which I didn’t use to appreciate, but then I tried to learn OCaml and had to give up because I couldn’t set up a proper dev environment on windows.
Rust certainly is an interesting language and very worth learning but, as you already pointed out, can hardly qualify as functional. It has some functional features and a rich type system for sure, but the way you solve problems in rust is mostly just imperatively and very different from the “FP-way” imo. If OP wants to get into FP specifically, I’d suggest picking a different language first.
On another note: Not quite sure why you’re saying OCaml ist hard to install, since the setup has been incredibly easy for me. Maybe the process has changed lately (they’ve been working on improving the tooling with opam and dune) but you can just follow the official installation instructions under https://ocaml.org/install and get it running in like 5 mins. If that doesn’t work, there’s always wsl.
Personally I’d suggest OCaml, as it’s a statically typed, expressive and pragmatic language with a decently sized and mature ecosystem. For learning resources there’s the wonderful Cornell book. Elixir is another hot contender and a pleasure to work with, as others have already pointed out. Pick Haskell if you’re interested in getting freaky later on and have built some foundational knowledge (personally I enjoyed the haskell mooc but there are other great resources like learn you a haskell for great good too).
It was years ago. So I don’t remember what exactly the problem was.
I believe ocaml has a shell interpreter and a compiler right? I managed to get the shell interpreter to work, but I couldn’t get one of these to work:
The reason I prefer windows is because things just work. But it was a frustration with ocaml. Meanwhile rust was a single command for the compiler, and a single extension install for the LSP.