Closed jpolitz closed 6 years ago
Agreed. I dislike them aesthetically, but the pragmatic benefits outweigh the visual ugly. (It's like trolling @shriram with an unclosed parenthesis.
I don't like unclosed parentheses, but I'm a strong advocate of trailing commas.
Btw, shouldn't this also then allow trailing semi-colons for tuples?
)
On 25 October 2016 at 14:31, Shriram Krishnamurthi <notifications@github.com
wrote:
I don't like unclosed parentheses, but I'm a strong advocate of trailing commas.
Btw, shouldn't this also then allow trailing semi-colons for tuples?
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/brownplt/pyret-lang/issues/906#issuecomment-256129020, or mute the thread https://github.com/notifications/unsubscribe-auth/AAajAtVUsnVHnTCgQp0a_4d2eUsTWl0Wks5q3krqgaJpZM4Kcv6d .
Tuples already made this design decision :-)
I assume that we don't want to allow [list: , ]
though, right? (That's the same restriction we have on object literals.)
This is allowed:
but this isn't:
It seems like this ought to be consistent.
I think the trailing commas are really useful for edits, refactoring lists of elements, and @pcardune points out that they are good for diffs.
But either way, Pyret should be consistent here.