3 ms·
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 afterw
by m-schuetz 2y ago
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.
- croes 2y agoThat’s why I use leading commas. Unless I change the first column, no problem.
- baq 2y agoWhen 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.
- nurettin 2y agoThat 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.
- baq 2y agoI hated them! I couldn’t stand the look. Learned to love the functionality of these though and the looks grew on me.
- croes 2y agoI mainly work with SQL and like them.
- boxed 2y agoYea, 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.
- croes 2y agoI 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.