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
3
u/GenericNameAndNumb3r Mar 15 '24
I agree that OCaml's type inference system is excellent, one of the best.
As to why I do it this way? I don't know, I find that it fits my thought process very well. I'm definitely not as well versed in OCaml as I'd like to be, since I'm relatively new, but I do feel comfortable with it enough to know that this way of working with explicitly typing things does slow me down a lot.
I assume that I felt more insecure at the beginning when I first got into OCaml and wanted to reduce that uncertainty by making sure what type everything is, but over time as I got more comfortable with OCaml and learning how its type system "thinks", I see the redundancy of my approach more clearly.
Thank you for pointing this counteintuitive thought out to me, I believe it's time to trust the compiler more and let go :)