4 ms·
I mean, having a sane protocol designed for use by applications rather than humans would be nice. It’s not that SQL is bad, it’s that mechanically generating i
by snuxoll 6y ago
I mean, having a sane protocol designed for use by applications rather than humans would be nice.
It’s not that SQL is bad, it’s that mechanically generating it is wrought with peril, gotchas, and a huge mismatch between the code we write to work with the data we retrieve from these sources.
Hell, s-expr’s would be a much better format and would require little implementation work.
- ethbr0 6y agoHow would s-expr's be a better format? (My lisp exposure is minimal)
- snuxoll 6y agoFor an application level interface they make sense - they’re trivial to generate and parse in any language, don’t require expensive bespoke parsers and lexers to be written, and the basic constructs are more appropriate for a query interface than something like JSON or other common serialization formats while still being human readable if needed. Again, SQL isn’t a terrible language - it’s just not designed to be mechanically generated in a sane manner. Libraries like jOOQ are useful because they handle a lot of pitfalls with runtime-generated queries, when we could avoid them altogether by having a better way of applications (rather than users) to query and manipulate data.