r/functionalprogramming • u/kichiDsimp • Mar 14 '24
FP Understadning Elixir but not really liking it
I have been developing in Go for the whole of 2023, and I really like typed languages, it gives me immense control, the function signatures itself act as documentation and you all know the advantages of it, you can rely on it...
I wanted to learn FP so after a lot of research I started with OCaml, and I felt like I am learning programming for the first time, it was very difficult to me, so I hopped to Elixir understood a bit but when I got to know that we can create a list like ["string",4] I was furious because I don't like it
What shall I do ? stick with Elixir ? go back to learn OCaml, [please suggest a resouce] . or is there any other language to try ?
View all comments
Show parent comment
4
u/v3vv Mar 14 '24
Why?
OCaml has one of the best type inference systems I’ve ever encountered and one might think it’s especially useful when prototyping.
Choosing not to leverage this feature during the prototyping phase and instead moving the type annotations into an .mli file later seems counterintuitive.
It’s generally more efficient to allow the compiler to infer types during the initial stages and then refine these types in the .mli files as the program stabilizes.