3 ms·
Software developers who are taught imperative programming are used to translating their high-level, human thoughts into imperative instructions telling the comp
by cultus 7y ago
Software developers who are taught imperative programming are used to translating their high-level, human thoughts into imperative instructions telling the computer exactly what to do to make the answer they want.
With functional programming, one is able to translate thoughts more directly. Non-programmers actually have an easier time with functional concepts like mapping than for loops, non-local mutation, etc.
At any rate, imperative languages have a legacy of frankly buggy, shitty software. As programs get larger and more concurrent, this problem is getting much, much worse. That's why functional(ish) libraries like Redux are so popular. They can help tame this complexity.
Imperative programming absolutely has its place in certain situations like systems or numerical programming, but it is a poor tool for most things people program. Rust, I think, is imperative programming done right. While it's a bit confusing with all the pointer types, it has the tools needed to safely mutate, etc.