-
Notifications
You must be signed in to change notification settings - Fork 17
Closed
Description
Please, consider not removing a trailing comma for multiline collections. Nim simply ignores it.
Having a comma at the end of every element makes it easier to add, move and sort elements (e.g. with Vim).
Example:
var arr = [
"zbc123looooooooooong line",
"abc123looooooooooong line",
"abd123looooooooooong line",
"bbd123looooooooooong line",
]
Formatted with nph:
var arr = [
"zbc123looooooooooong line",
"abc123looooooooooong line",
"abd123looooooooooong line",
"bbd123looooooooooong line"
]
Now If you have to copy or move the last line or add elements after it - you can often forget to put a comma.
Is there a downside to having a trailing comma?
I don't see any.
xigoi
Metadata
Metadata
Assignees
Labels
No labels