Hacker News new | ask | show | jobs
by foota 2419 days ago
Wouldn't you have to implement a DSL and all the parts related to it for that to work? Also things like serialization cost. What if I have a large local in memory structure I want to base my query results off of? Funny enough this is kind of similar to the problem solved by things like apache beam.
1 comments

No you'd need a complete programming language. But SQL is basically one already, most variants are already turing-complete.

You'd also have to provide the programming environment with concepts of cursors and so on so they could page through data efficiently.

Every procedural layer I've ever used bolted onto SQL (pl/SQL, t-sql) has been absolute goddamned agony to use.

SQL is a good (if dated) language for relational access and manipulation, but awful for procedural scripting.