|
|
|
|
|
by gerritsg
2855 days ago
|
|
Do you think monads, functors, recursion, and immutability (just to take a few staples of functional programming) are easier for a beginner to wrap their head around than loops, re-using variables, etc? I would be surprised if, using a sample group of say 100 beginner programmers, the majority found Haskell easier to learn and write beginner stuff in than JavaScript, python, or insert-primarily-imperative-language-here. |
|
If you start with defining functions, calling them, composing them, and using map/filter/reduce and all the stream like operations filter, remove, select, merge, substract, etc. I think it might be just as simple.
Haskell is a bad choice though, because it also forces you to learn about advanced type theory.
The truth is, I do believe there is a gap in that there's no FP language that doesn't also introduce another complex paradigm. MLs introduce advanced type theory. Lisps introduce advance meta-programming and homoiconicity.
If you take Python, and teach it using only its FP constructs, I think that is probably simpler to learn to a beginner.