Hacker News new | ask | show | jobs
by king-rat 2519 days ago
Interesting that the semicolon was born out of a need for a longer pause in spoken language, rather than as a means to connect two independent clauses as is taught today
5 comments

Virtually all punctuation marks started as prosody hints, indicating intonation and pauses, suggesting how the text is to be read aloud. In fact you can argue that this is still the case: it was only later that we invented grammatical structure rules for them, and even those are applied only in certain contexts like professional writing. In casual writing, we tend fall back to using punctuation as prosody markers, for example: "Worst. Episode. Ever."
Yes, reading a transcript without punctuation can give one a visceral sense of what drove its introduction.
If there are two independent clauses, why not keep it 2 sentences? I personally use it to connect two separate thoughts that have a related subject.
"Independent clause" doesn't mean "unrelated thought," it's grammar terminology for a phrase that makes sense as a simple sentence: https://en.wikipedia.org/wiki/Independent_clause
Also that the article talked about the colon as having a longer pause than a semicolon (different to how it is used today).
Did they not have the ellipsis back then?
Or as an unnecessary end of statement character to clutter up your code with.
> Or as an unnecessary end of statement character to clutter up your code with.

To the benefit of compiler writers, in detriment of everyone else.

I've come in to fix bugs caused by ASI many a time. Having an explicit character to denote the end of a statement is much more valuable than people pretend.

And don't get me started on meaningful whitespace vs brackets.

> Having an explicit character to denote the end of a statement is much more valuable than people pretend.

No, I'm not talking about automatic semicolon insertion. I'm talking about _ not having semicolons at all _.

Many languages are like that – in fact, almost all languages which are not descendants of the C branch.

I think you quoted the wrong part of the message there, but I understand.

Still, without a line terminator you either have to use newlines, which sometimes will help make cleaner code and sometimes will make a mess of temporary variables and such. Or you have ambiguity, which is why I bring up the the anecdotes about fixing ASI errors.

Which makes it interesting that the Go creators, being heavily into C before, decided to ditch the end of statement semicolon.