2 ms·
My experience so far with functional languages (as an OOP-er): * After a whole evening studying I am able to subtract 1 from 5. * After spending hours checkin
by thdrdt 6y ago
My experience so far with functional languages (as an OOP-er):
* After a whole evening studying I am able to subtract 1 from 5.
* After spending hours checking what is wrong it just does not compile.
* After the hello world part there are no libraries that can be used for web development.
* Lack of good documentation.
* Lack of good tutorials.
But lately I discovered Elixir and I believe this could be a language that would change my mind about functional programming. Phoenix looks great and LiveView matches .NET Blazor (which I use a lot).
But then there is still the question: why even bother using a functional language? Because I have little experience in functional languages this is hard to answer for me.
Edit: "After a whole evening studying I am able to subtract 1 from 5." I should have formulated this different. What I meant was: sometimes you follow a very long tutorial about a functional language. You will learn a lot about the syntax but in the end when you try to use it, you will only get to the basics of writing a function that subtracts x from y.
- eru 6y agoWhich language did you try to come to terms with, and what material did you use? How much are you exaggerating?
- smabie 6y agoI dunno man, I don't think I believe you. After a whole evening of studying you can subtract 1 from 5?
- StreamBright 6y agoFunnily enough 5 - 1 works almost in every language the same way. Maybe with a different syntax but I cannot think about any FP language where I cannot do it.
- smabie 6y agoI mean Lisp. But It's pretty debatable whether Lisps are functional languages. Imo, static typing is a requirement, at least culturally.
- StreamBright 6y agoYeah but (- 5 1). Maybe I just do not care about syntax anymore. Static typing is great but I can live without it. Static typing without the advanced features is not really as helpful. Ada got many things right about types. Like subtypes with constraints for example.
- eru 6y agoAs far as I can tell at the International Conference on Functional Programming the Schemers are treated as full member of the functional programming community, despite lacking static types. Static types are neat, and FP people tend to really like them, but I wouldn't call them a strict requirement even culturally. You can make a statically typed Lisp, of course. Just like you can make a dynamically typed ML-like language. Haskell even sort-of supports that. See https://gitlab.haskell.org/ghc/ghc/-/wikis/defer-errors-to-runtime https://gitlab.haskell.org/ghc/ghc/-/wikis/defer-errors-to-r...