2 ms·
Absolutely. Relational databases are so useful that I happily use SQL even though it is not a very good language. I have thought about making a "compile-to-SQL"
by default-kramer 9y ago
Absolutely. Relational databases are so useful that I happily use SQL even though it is not a very good language. I have thought about making a "compile-to-SQL" language in the same vein as Typescript. (Does this already exist? You would think so, but I can't find one.)
HTSQL has some great examples of where SQL could be better: http://htsql.org/doc/overview.html#why-not-sql http://htsql.org/doc/overview.html#why-not-sql. I would love to get that goodness in a language not tied to the rest of HTSQL.
- Zak 9y agoThere have been a few languages that compile to SQL. CLSQL for Common Lisp and Korma for Clojure come to mind.
- jmcqk6 9y agoThere are quite a few things that "Compile-to-sql". In .NET, the EntityFramework ORM takes the AST from the C# code int he query and generates the SQL from it. I'm not sure how ORMs work in other languages, but I would imagine it's something similar.