News for hackers. Stuff that matters.
Re:SQL Tips and Tricks by arp242 on Wednesday September 25, 2024 @11:40AM (#41648631)
A lot of "readability" depends on what you're used to and what you expect. I don't think these conventions are inherently "ugly" or "confusing", but they are different to what I've been doing for a long time, and thus unexpected, and thus "ugly". But that's extremely subjective.

I've done plenty of SQL, and I've regularly run in to the "fuck about with fucking trailing commas until it's valid syntax"-problem. It's a very reasonable convention to have.

What should really happen is that the SQL standard should allow trailing commas:

  select
     a,
     b,
  from t;
Re:SQL Tips and Tricks by jghn on Thursday September 26, 2024 @08:13AM (#41657436)
> A lot of "readability" depends on what you're used to and what you expect.

Yes. Typically shared sense of "readability" in a community for language X translates to "idiomatic patterns when writing X". There's no real thing as readability in a universal sense. It's a placeholder statement for "it's easier for ME to understand", double emphasis on "ME". Within a community, "readability" standards are merely channeling the idiomatic patterns within that community as for most members they'll be easier for the person to understand as it's what they're used to seeing.

Re:SQL Tips and Tricks by jononor on Saturday September 28, 2024 @02:05PM (#41681920)
Yes pleeease allow trailing commas. The amount of times I have stubbed my foot on that... Especially when removing or commenting out a line. Doesn't help that many environments where SQL used has poor syntax highlights on errors. Looking at you, Grafana...