Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

During prototyping, I'm frequently adding and removing entries from lists, or change their order. It's really annoying when you have to update the commas afterwards. Much nicer dev experience when ever entry ends with a comma, and you can juggle them around at will.


That’s why I use leading commas.

Unless I change the first column, no problem.


Yea, and if you do trailing commas, "unless I change the last column, no problem". This is exactly the problem.

Supporting leading or trailing redundant comma are both good options. Not supporting either isn't.


I rarely change the first column in a query but often the end especially while debugging. So a leading comma isn't the same problem to me.


When you start working with sql you despise leading commas.

When you stop working with any other code than SQL you look back on your younger self and think ‘I was soooo young’ when typing those lovely leading commas.


That sounds made up on the spot. I wrote leading commas in SQL for decades, no such thought crossed my mind. I still use and suggest them to people. They look especially good when aligning selected columns.


I hated them! I couldn’t stand the look.

Learned to love the functionality of these though and the looks grew on me.


I mainly work with SQL and like them.




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: