Hacker News new | ask | show | jobs
by PeterisP 4820 days 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'.

1 comments

I'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.