Semicolon Usage Debate

The cluster centers on debates about the necessity and use of semicolons in programming languages, with frequent references to JavaScript's optional semicolons, language design choices, and related syntax issues like automatic insertion.

📉 Falling 0.4x Programming Languages
4,456
Comments
20
Years Active
5
Top Authors
#2079
Topic ID

Activity Over Time

2007
6
2008
47
2009
92
2010
182
2011
242
2012
514
2013
244
2014
288
2015
277
2016
301
2017
250
2018
182
2019
251
2020
268
2021
251
2022
303
2023
254
2024
265
2025
228
2026
11

Keywords

US UX JS OP python.org BCPL JavaScript SEMICOLON PR AFAICT js syntactic sugar syntactic sugar brackets cancer javascript insertion statement ocaml

Sample Comments

TylerE Jan 4, 2013 View on HN

Why do language designers continue to insist on semi-colon terminated lines?

jcapote Oct 10, 2011 View on HN

Why do languages still require semicolons in this day and age?

quickthrower2 Aug 23, 2022 View on HN

Like the optional semicolon in JS. I am a semicolon guy (and general unfan of JS tricks and shortcuts) but plenty of people prefer not to have them!

jchassoul Sep 5, 2018 View on HN

Syntactic sugar causes cancer of the semicolon!

zbjornson Sep 18, 2016 View on HN

I'm surprised no one has compared this to omitting semicolons in js. In both cases it's a rather lengthy list of conditions the writer needs to know about in order to be absolutely sure you're coding correctly, and in both cases the benefits are debatable. (The list of conditions when js semis can't be omitted are obscure at least.)

gwf Sep 29, 2012 View on HN

Does this mean we can finally have semicolons?

seattle_spring Sep 19, 2018 View on HN

This is almost as scary as all of the people that insist on not using semicolons in JS.

EtienneK Apr 19, 2012 View on HN

The lack of semicolons in the article's examples makes me uneasy...

talleyrand Apr 5, 2012 View on HN

No semicolons in javascript! This is subversive and should be suppressed.

lupire Feb 14, 2022 View on HN

Syntactic sugar leads to cancer of the semicolon.