Hacker News new | ask | show | jobs
by memelang 237 days ago
Long term, SQL will be phased out for new LLM-friendly query languages. The cost of AI generating tens of billions of queries per day creates a new incentive for rationality and efficiency that overcomes the human institutional weight of legacy languages. I'm working on such a language now: https://memelang.net/
5 comments

If history is any indication, you've got it backwards: it's more likely that LLMs will be phased out for SQL.
What history are you considering?
I've only been through a few cycles, but there's three flavors I've seen:

1. Better query language: QUEL, LINQ, etc.

2. Better data model or performance: CouchDB, Mongo, Redis, etc.

3. Better abstraction: Zope, Active Record, et. al.

SQL vendors keep absorbing the differentiating features from other approaches with enough success that they capture most business use cases. That's not to say there aren't successes outside of SQL! But I've seen it claimed SQL will be dead several times over thanks to some new tech and most of the time SQL instead kills that tech or makes it niche.

Why would it be phased out? This doesn’t track. If anything SQL is stickier than ever since LLMs are actually pretty good at generating it.
Ah ournfuture where we vibe code memelang
I've always found it odd that most databases don't expose a kind of query bytecode API that SQL can be converted to. It would allow more kinds of languages, different SQL dialects, compile-time optimizations, and perhaps ORM could be compiled directly into your target database spec. Would reduce the amount of string operations by client code, at least
For translation between dialects, you could use projects such as SQLGlot. The advantage of SQL is the standardization over many decades (yes, I know that it's still a mess with the different dialects).
SQLGlot is amazing. In many ways it helps erase the differences and bridge between dialects. It is so useful for moving complex queries between platforms.
Agreed, and it's an amazingly well-maintained GitHub repo: https://github.com/tobymao/sqlglot

Big kudos to Toby and the team.

That doesn't make sense. LLMs will be used to write SQL, I'm sure (I do that) but replacing SQL?
I do agree. SQL is simply an access API for so many systems, and nice as it's a declarative language rather than a normal programming language. LLMs are super powerful to express questions to data that can then be translated into SQL.