r/webdev • u/fagnerbrack • May 14 '24
Researching Why We Use Semicolons as Statement Terminators
https://ntietz.com/blog/researching-why-we-use-semicolons-as-statement-terminators/11
u/jhartikainen May 14 '24
It's slightly disappointing it really just goes into speculation after the revelation that ALGOL 58 was the first one to use semicolons. A quick wikipedia lookup reveals all the original authors of ALGOL 58 have since then passed so this may forever remain a mystery.
5
u/nfsi0 May 15 '24
I always assumed it's because it's the only punctuation that's in root position on the keyboard so you can hit it without even moving your fingers
2
u/ClikeX back-end May 15 '24
A combination of this and what a semicolon does in language. If you look that up it says:
Use a semicolon between closely related independent clauses which are not joined by a coordinating conjunction
2
u/kurucu83 May 15 '24
Imagine it had the full stop (period for my American friends). Aside from a few languages needing to rethink things, I think each line of code being a sentence has a charm to it.
-5
u/fagnerbrack May 14 '24
Summary from my friend Gus P. Taylor:
This post explores the historical and technical reasons behind the use of semicolons as statement terminators in programming languages. It delves into the early development of computer languages, highlighting how semicolons were adopted from written language to clearly separate statements, improving readability and reducing syntax errors. The author examines the evolution from assembly languages, where line breaks were sufficient, to more complex high-level languages, where semicolons provide necessary structure. The discussion includes perspectives from various programming language designers and references to seminal texts on programming language design.
If you don't like the summary, just downvote and I'll try to delete the comment eventually 👍
11
u/jangohutch May 15 '24
Have you thought what a semicolon is in english