2 ms·
SQL is a declarative reactive language. There's something to gain by adding functions as first-class objects, but I don't think rethinking it from functional fo
by marcosdumay 10y ago
SQL is a declarative reactive language. There's something to gain by adding functions as first-class objects, but I don't think rethinking it from functional foundations would help. Lambda calculus is focused on data processing, and a query language must be focused on data searching, those are completely different applications.
But I do completely agree with the pain points you pointed there. I'd go further on the first point, client software should have an easy way to check its guarantees at connection time too.
- js8 10y ago> There's something to gain by adding functions as first-class objects, but I don't think rethinking it from functional foundations would help. So what other approach to designing a declarative language do you want to take? I propose total functional language because it's extremely simple and systematic approach. You add your primitive types, primitive functions, primitive type operators (like algebraic types) and voila - you are pretty much set. That way, you get lot of reusability which would be hard to do in an adhoc designed declarative language. And a very uniform syntax as a nice bonus. My question is not rhetorical. Building declarative languages based on typed lambda calculus is very well understood.