4 ms·
Declarative programming in general is notorious for being difficult to debug. SQL is the only language I can think of where this notoriety doesn't come up, and
by jcranmer 8y ago
Declarative programming in general is notorious for being difficult to debug. SQL is the only language I can think of where this notoriety doesn't come up, and I'm honestly not sure if that's merely because I've never interacted with anyone who has had to deal with sufficiently complex queries. But the insanity that's involved with complex regular expressions, parser generators, even Python's decorator system in complex declarative projects (e.g., some build system tooling I've worked on) is commonly complained about.
- nerdponx 8y agoI've never interacted with anyone who has had to deal with sufficiently complex queries This might be a big part of it. SQL is a limited domain, with limited tools available. Doing "general purpose" programming with SQL requires advanced trickery and is implementation-dependent. Another example might be Excel, which has a declarative interface (i.e. a GUI) and a semi-declarative formula syntax.
- hodgesrm 8y agoThe standard 'debugging' problem in SQL is query optimization, namely figuring out how to make a query return in seconds instead of a week. Many engineers simply can't solve it, so a typical solution is to hand it over to a DBA and go have coffee.