Skip to content

Conversation

@fertapric
Copy link
Member

I think there are pros and cons about trailing commas, but this change is consistent with the formatter.

@josevalim josevalim merged commit bd6f2eb into elixir-lang:master Dec 21, 2018
@josevalim
Copy link
Member

❤️ 💚 💙 💛 💜

@eksperimental
Copy link
Contributor

May I ask what are the pros.

@OvermindDL1
Copy link
Contributor

May I ask what are the pros.

@eksperimental Seems off-topic here and it's been discussed elsewhere, but the most common pro's are consistency with all other list elements and easy copy/pasting (like say the hex.pm website had a , at the end of it, then you could just copy/paste the thing into a new line and it wouldn't matter if it was at the end or not or needing to remember to add a comma to another list element or not, it would just work (I forget adding a comma quite often when adding a dependency as one example). I use trailing commas for both these reasons.

@eksperimental
Copy link
Contributor

Sorry, I meant what are the cons

@OvermindDL1
Copy link
Contributor

Sorry, I meant what are the cons

Inconsistency with the existing formatter style? I honestly don't see cons with using trailing commas on element-by-line list/tuple/arg/map formatting personally, but do see lots of pros.

@fertapric fertapric deleted the patch-15 branch January 15, 2019 19:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

5 participants