...and something changed to where I felt each element needed to be on a separate line. I'd have to actually go back and REMOVE all my commas, which feels like unnecessary work.
tuple = [1
2
3
4
5
6
7
8
9]
(and so on).
Or what about a mix? Do I need commas at the END of the line, which I'd feel compelled to add out of habit with all other languages?
Your latter example (mandatory between items on the same line but optional at the end of a line) is pretty much exactly how CoffeeScript objects and arrays work, so there's definitely precedent for that!
Definitely with commas. Imagine if I had this...
...and something changed to where I felt each element needed to be on a separate line. I'd have to actually go back and REMOVE all my commas, which feels like unnecessary work.
(and so on).
Or what about a mix? Do I need commas at the END of the line, which I'd feel compelled to add out of habit with all other languages?
Now, if the commas were merely optional in this case, I might see that as being workable. From there, we just get into Perl (TMTOWTDI) v. Python (TOOWTDI) philosophy.
The commas would be optional on line end. All of the syntaxes you provided here would be acceptable.
Though I'd argue that mixing within a single tuple is perhaps not good practice -- I wouldn't go out of my way to forbid it though.
Your latter example (mandatory between items on the same line but optional at the end of a line) is pretty much exactly how CoffeeScript objects and arrays work, so there's definitely precedent for that!
Then again, CoffeeScript and its relatives aren't exactly widely considered a pinnacle of good language design. Useful, but not exactly elegant.
Yeah, it's precedent, but not necessarily good precedent :p