|
|
|
|
|
by AnimalMuppet
4275 days ago
|
|
Functional programming (with immutability) is a really bad match for my world, which is event-driven embedded systems. (Garbage collection is also a bad idea if the system is real time. Yes, there are ways of working around it, but it's making your problem harder. Why do it?) Even more, I wouldn't use immutable functional programming for writing an OS. An OS is all about mutating state that keeps track of resources. For that matter, I wouldn't use functional programming in any situation where the nature of the problem cried out for mutating state. I wouldn't use garbage-collected code to write a memory manager. I wouldn't use it to write crypto code (leaving old crypto data hanging around in memory is a major no-no). But we get these loud zealots who tell us that FP is The One Right Way, and that we're stupid and/or ignorant if we don't convert at once. I suspect that a lot of people with experience just tune them out, because it's so obvious that what they're saying is unrealistic. But if they were a bit more aware of the variety of the real world of programming, and knew where FP worked and where it really didn't fit, they might get more of a hearing. |
|