|
|
|
|
|
by jaked89
2481 days ago
|
|
The ability to change value by ref is crucial to most real-world apps. This is not surprising, as those apps are modeled to represent a real, dynamic world. Functional languages tend to disregard this, and demand composition over mutation. While this works for some domains, it's a burdensome complication for others. Imperative languages are here to stay. |
|
Another example might be a text editor buffer. Immutable persistent data structures allow one to get many features for free such as versioning, undo, lockless autosave. Memory is cheap now, there's less of a need to throw away some my edits with destructive updates. Even filesystems and databases have realised this is good idea. Destructive updates are bad for valuable data.
Imperative programming is only better for writing low-level system code, which is full of state that ultimately no one in the real world cares about.