4 ms·
Very odd that this article states that functional programming is the solution to the null reference problem. Yes as far as I know all functional languages have
by misja111 4y ago
Very odd that this article states that functional programming is the solution to the null reference problem.
Yes as far as I know all functional languages have some kind of Optional or Maybe type as a solution, but there are non-functional languages with this solution as well.
- munchler 4y agoPerhaps, but those are still FP solutions that have been added to non-FP languages.
- chriswarbo 4y ago> Yes as far as I know all functional languages have some kind of Optional or Maybe type as a solution, but there are non-functional languages with this solution as well. Optional/Maybe values are tedious if we don't have functions/methods like map, flatMap, etc. which take functions as arguments. That requires first-class functions, which pushes things further in the direction of FP. I think of things on a spectrum, e.g. more-functional/less-functional, rather than having a hard cutoff of "this is FP" or "this isn't FP".