News for hackers. Stuff that matters.
Re:SQL is 43 years old – Here’s why we still use it today by wolfgang42 on Tuesday May 02, 2017 @11:55AM (#14247448)
Basically yes, though I'd also make it so if you alias a field it's referred to by the alias from then on (e.g. FIELDS foo AS bar ORDER BY bar instead of SELECT foo AS bar ORDER BY foo). I'd probably be inclined to rename some of the keywords as well (SORT, FILTER, MAP, REDUCE perhaps).

There are some query builder libraries that let you specify clauses in a different order, like "query.from(table).where(col, value).select([...fields])", but I have yet to find one that lets you specify the query as a series of transformations on tables. (I think the word I'm looking for is "isomorphic" but that doesn't seem right somehow.)

Re:SQL is 43 years old – Here’s why we still use it today by stephenhuey on Tuesday May 02, 2017 @01:11PM (#14248277)
Have you ever seen Arel?

https://github.com/rails/arel