A new proposal Unordered redundant commas is started reviewing by Committee.
So it is time to upvote/downvote in first comment and any other feedback is welcomed.
This topic was discussed over decade and we have 3 groups of opinions where redundant commas could be allowed:
Anything is better then nothing
Everything or nothing
If something, then a simple and obvious rule to distinguish when it is allowed must exists.
This proposal from 3rd group: we allow redundant commas (leading commas, trailing commas and extra commas) in UnOrdered structures:
If you still didn’t read or vote in first comment for the proposal to allow leading and trailing commas in unordered structures ( export/import lists and sublists, deriving and defaults clauses, records) - you still can do that before Committee make the decission!
Ok. My proposal is observed and even upvoted by the Committee.
It is called now “Extra NonTuple Commas”.
But I think this is too broad and maybe “Extra NonData (NonTuple, NonLists, NonRecords) Commas” would be better decision.
But what are you thinking? It is Ok to comment here or in the Proposal pull.
The final decision will come soon! And it is still possible to have some influence on it.
Finally, the proposal was accepted with name ExtraCommas!
This extension allows to use AND leading comma AND trailing commas in most of structures, except tuple-like (tuples, unboxed tuples, constrain tuples) if such structure contains at least 1 item.
This includes
export lists and sub-lists
import lists and sub-lists
deriving clauses
list comrehensions
literal lists in expressions and patterns
records in terms and types (declarations, patterns, constructions)
multi-name function signatures including nested fields in records