Hello Golangnuts,

Why there is no difference if the last comma exists?

{'A', 'B', 'C', 'E'}  
or
{'A', 'B', 'C', 'E',}

both are valid.


Sometimes it causes little troubles. For example, the second snippet 
wouldn't compile, because of different formatting. But these two snippets 
are identical technically. So, you have to add this last comma to keep the 
formatting you want. Which can be annoying.

https://play.golang.org/p/4Vav9n2_NIc

https://play.golang.org/p/pr2h6_FBxFn


I think it's very good idea to make the last comma obligatory.

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to