Did you know? Ever wondered why C# uses the semicolon to terminate a statement? Obviously it comes from the C/C++ heritage it shares with other languages like Java, but where did C get it from? That would be Algol, where the semicolon was used to separate statements.
But why the semicolon? In natural language grammar, the semicolon separates two independent but related clauses; it can also be used to separate items in a list (see what I did there?). And what is a program but a list of independent but related clauses?
(Bonus punctuation trivia: the comma is used to separate items in a list, just like the arguments in a function call. The period is used to end a complete thought, like a sentence or paragraph. How did Algol mark the end of a program unit? Why yes, with a period!)
Welcome to dotInsights by JetBrains! This newsletter is the home for recent .NET and software development related information.