News for hackers. Stuff that matters.
Re:Left to Right Programming by mamcx on Monday August 18, 2025 @06:15PM (#44945874)
Even assuming that this is plausible way a user could think about it (that can be understood) it shows why is bad

Think: I have 20 tables with the column `id`

"I want 'id,id,id'"

is bad UX, and is what here is being argued, then when the syntax guide you: "I want 'FROM a: id'" is better

Re:Left to Right Programming by taeric on Monday August 18, 2025 @06:31PM (#44945981)
I don't think anyone would ever say they want "id, id, id"? They would say they want "customer_id, order_id, item_id" or some such. You would then probably say, "we just use 'id' for the id of every item..." but many places that I've worked actually explicitly didn't do that for essentially this reason. Natural joins on "foo_id" "just work" if you don't give every table the same "id" column.
Re:Left to Right Programming by mamcx on Tuesday August 19, 2025 @02:25PM (#44954639)
That is what the syntax allow. And is the user that need to "patch" the meaning using other things like alias, renames or hopefully, proper names for fields (by the way "id, id, id" happens a lot in the wild!)

Is like "to control mutation I only need to append "mut" to the name!

Re:Left to Right Programming by necovek on Monday August 18, 2025 @11:48PM (#44948080)
Current SELECT syntax does allow one to "SELECT user.id as user_id, product.id as product_id..." which can then even autocomplete the FROM for you from your query "declaration" (a-la function declaration, in particular its return type).