3 ms·
I think there is a fundamental reason. The computer is inherently mutable. As a result, the basic abstractions of operating systems are mutable. Thus, except f
by RcouF1uZ4gsC 6y ago
I think there is a fundamental reason. The computer is inherently mutable. As a result, the basic abstractions of operating systems are mutable.
Thus, except for nicely contained problems such a text transformation (see Pandoc for an awesume use of Haskel), interfacing with the computer and the rest of the world becomes an impedence mismatch. Yes, monads are awesome, but you shouldn't need a math PhD, to print "Hello World" to the screen and understand what it is doing.
The other issue is performance. Yes, performance is generally good enough, except when it is not, and when it is not, it is not obvious why you are having issues or what you can do to fix them. This once again comes to the abstraction mismatch between the mutable computer and the pure functional language.
- eru 6y agoModern CPUs re-order your instructions based on data dependencies. If you want to argue from the bare metal, that should count for something, or not? In any case, compilers are pretty good at making you not have to care too much at what goes on in the lowest level. (Unless you care eg about absolute speed. But then, an imperative-only understanding is not going to cut it either.)
- alipang 6y agoMonads are among the simplest abstractions you can find in computing. Compared to almost anything you need to understand in software development (how the hell do I make webpack do the thing I need?) they're ridiculously easy. The fact that so many devs are scared of monads and believe outrageously silly things like you need a math phd to understand them seems to be similar to being afraid of drinking dihydrogen monoxide. Even though it's only water, it has a complicated sounding scary name, so it must be bad.
- saagarjha 6y agoThere’s also a huge number of people who are fairly bad at explaining what exactly it is. I don’t think I should fault them, per se, it’s sort of trying to explain why water is wet.
- StreamBright 6y agoNo doubt, however, writing programs using immutable variables makes programming easier. The compiler can do the transformation from immutable to mutable much safer than the human mind.
- tome 6y ago> you shouldn't need a math PhD, to print "Hello World" to the screen and understand what it is doing Which one requires a PhD? main = putStrLn "Hello world" public class HelloWorld { public static void main(String[] args) { System.out.println("Hello, World!"); } }
- nilkn 6y agomain = putStrLn "Hello, world!" No PhD required.