6 ms·
On the flip side, it also drastically changes the typical errors. In imperative style, most of your mistakes or carelessness will usually mean that the machine
by PeterisP 14y ago
On the flip side, it also drastically changes the typical errors.
In imperative style, most of your mistakes or carelessness will usually mean that the machine makes a wrong result or crashes in the process - a bad 'what'.
In declarative style, most of your mistakes or carelessness will usually mean that the machine will take a bazillion times less efficient way trying to make that result, possibly taking 'forever' or running out of memory - i.e. a bad 'how'.
- JoshTriplett 14y agoI've found in declarative style, most mistakes just turn into compilation errors. That said, the "why did it choose that terrible implementation?" problem does occasionally come up in declarative programming, and inherently never comes up in imperative.