3 ms·
The authors argument that SQL's english-like syntax is a "well-intentioned error" overlooks the accessibility it provides. SQL, inspired by relational algebra,
by weatherlight 3y ago
The authors argument that SQL's english-like syntax is a "well-intentioned error" overlooks the accessibility it provides. SQL, inspired by relational algebra, enables set-based operations, distinct from procedural programming's linear approach.
This 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.
- vkazanov 3y agoThe things with SQL is that it's more like parroting RelAlgebra instead of trying to implement it with a comfortable syntax. All the bad ideas of the Cobol language generation come with it. And, like you said, SQL kills one of the core ideas of RelAlgebra: composability. I find it very sad that behind the scenes in most relational DBs, the mess off SQL gets translated to the operator language which the optimizer works with. Now, /that/ language is pure relational algebra complete with nice mathy properties.
- jeltz 3y agoThe optimizer does not work work on pure relational algebra. Or works on something very similar to SQL in the case of PostgreSQL.
- vkazanov 3y agoThe operators in PostgreSQL used to represent something that feels a lot closer to rel algebra than SQL. Admittedly, I haven't looked at pgsql code for 10+ years so this could have changed.
- alserio 3y agoBeing readable as english for the business people was a fad of the era. It didn't pan out, it made a mess. I still want to view the results of a controlled trial to test that hypothesis... Personally English is very different from my language and I process programming languages and natural languages very very differently. SQL is often good because is declarative, is almost always bad because of its composability story, but is and always will be a mess that makes some things more complicated than they should.
- gregw2 3y agoSee my other post in this thread. The authors are from China so English is not a plus for accessibility in their market’s business users or analysts.