SQL looks like English is a well intentioned error
1–10 of 24 posts
Re: SQL looks like English is a well intentioned error
#2Re: SQL looks like English is a well intentioned error
#3When I am authoring SQL, I find the declarative and relational concepts extremely powerful and well suited to the problem I am solving.
Re: SQL looks like English is a well intentioned error
#4Lately I've been experimenting the usage of LLMs for the explainability of SQL stored procedures with exceptionally good results - think about identifying important fields, linking them to existing glossaries, expanding said glossaries, etc. I wonder how much SQL looking like natural language helped for my use case.
Heavily agree here. LLMs have significantly shortened the time it takes me to write complex queries.
Re: SQL looks like English is a well intentioned error
#5group /= groupBy.
Group just put things in groups. GroupBy allows for a function on the item to be used (think passing a custom comparator into a sort() function). In SQL's case I think this is just limited to a column id, but I could be wrong.
> The main downside of being like natural language is non procedural. Program logic is generally executed step by step
SQL has thrived on being non-procedural. It is high-level and abstract, and its various implementations make much better optimisations than would the average-idiot-programmer-in-a-hurry.
All that would go out the window if the programmer had to write how to do things. Forget 'repeatable read' or 'linearisable' or any correctness guarantees provided by a database - if it's up to the programmer to write how, not what, then your correctness guarantees are basically: "I hope every programmer who touched this codebase took the right number of locks in the right order at the right time".
Re: SQL looks like English is a well intentioned error
#6Re: SQL looks like English is a well intentioned error
#7I am no fan of the syntax of SQL, however the authors solution of making SQL more procedural is (imo) correctly identifying an issue but then reaching for the wrong tool to fix it. When I am authoring SQL, I find the declarative and relational concepts extremely powerful and well suited to the problem I am solving.
Changing SQL to a description of how you'll get the data would make a query incomprehensible to me.
Re: SQL looks like English is a well intentioned error
#8Lately I've been experimenting the usage of LLMs for the explainability of SQL stored procedures with exceptionally good results - think about identifying important fields, linking them to existing glossaries, expanding said glossaries, etc. I wonder how much SQL looking like natural language helped for my use case.
Re: SQL looks like English is a well intentioned error
#9This is why SQL has endured for so long.
That mathematical base allows for efficient data manipulation across vast datasets.
To his point that no other languages strive to be spoken like, languages like ruby (and python to a degree )have successfully adopted a natural, english-like syntax, enhancing readability and developer productivity.
Emphasizing procedural over declarative concepts misinterprets SQL's core advantage: expressing complex data relationships and manipulations succinctly. Such perspectives miss the broader utility of making programming languages approachable and efficient for diverse tasks and user backgrounds.
Side rant: I just wish SQL was more composable.