3 ms·
> But if that's the case, why are declarative languages not more popular? Declarative programming is not very popular because it’s hard to debug. You can’t ste
by erikpukinskis 3y ago
> But if that's the case, why are declarative languages not more popular?
Declarative programming is not very popular because it’s hard to debug. You can’t step through it and inspect intermediate representations. It presents a black box to the developer.
That said, they do seem to show up around certain very complex APIs sometimes.
Besides SQL, CSS is the obvious one.
And I think many parts of otherwise functional/imperative APIs are pseudo-declarative.
For example, React is famously functional in its current form, with render functions and hooks being functions… but then common hooks take a dependency array which is declarative. And at the boundary of these hooks the code is no longer procedural, it disappears into the framework.
> I wish databases have better, faster, and standardized support for a fast procedural language.
That’s a fascinating idea. It would take someone with deep knowledge of a query engine to encapsulate it with a procedural API instead of a declarative one.
That’s not me, but I would love to see it.
- deleted 3y ago[deleted]