Hacker News new | ask | show | jobs
by XorNot 4400 days ago
It is one of the more foolish things that programming languages leave around though. If I'm writing an enum which is bracket closed, then don't make leaving in an extra comma an error if it's unambiguous.

As I recall I think most of the brackety languages actually do ignore it now? So it's a good way to mitigate at least that small problem.

1 comments

Hack (Facebook's PHP-derived statically typed scripting language) definitely does allow it, which is nice.

In fact, over on #hhvm I was told that Facebook's Hack style guide requires a trailing comma, which I think is a good thing and will catch a lot of silly errors.