TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

That trailing comma

2 点作者 davecheney超过 10 年前

1 comment

ggchappell超过 10 年前
I agree that this is a nice thing. A similar phenomenon happens in Python. There, the trailing comma on a final item is mostly optional, but I usually put it in regardless. Occasionally I have to deal with similar code in C++, and it&#x27;s always just a bit annoying.<p>I&#x27;m reminded of how refreshing it was to move from Pascal to C &#x27;waaaay back when. Among other things, I could now end <i>every statement</i> with a semicolon, no matter what.<p>Little (and big) changes in syntax that make life easier for the programmer are worthwhile. Language designers, let&#x27;s pay attention to these things!