Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

This is the kind of thing that really annoy programmers (because in programming languages, you can never omit things like this), but everyone else is perfectly fine with.

As a programmer though, it certainly annoys me!



I feel the same way, but I think programmers should hold their feelings and just pick up an APA, MLA or Chicago style guide or whatever the equivalent is if you're writing in British English and embrace the rules. Or if you're publishing, let an editor fix your stuff.

Every effort to make a logically consistent "engineered" language has so far failed by any reasonable measure, notably, Esperanto. Others have tried and had even less success than Esperanto. For things to even change in language usage there really has to be a pain point or some kind of trauma or isolation. Mere aspiration for aesthetics or logical consistency isn't enough. How did the American English come to be anyway? A bunch of people got on boats and went to a remote wild continent and stayed there. Forever.


This is sound, pragmatic advice. But it doesn't mean we have to like it.


> everyone else is perfectly fine with

My newspaper will shorten "United States" to "U.S.", and not add an extra period at the end of a sentence. (Not sure if the spaces are different widths.) When the next word would naturally start with a capital letter it can be difficult to tell whether the sentence ends after the abbreviation, sometimes making for garden-path sentences.

>> There have been some rumblings inside the U.S. Supreme Court justice Stephen Breyer said in an interview...

Though I am a programmer, so maybe it is just us...


In fact in some programming languages you can (or should) omit things like this. E.g. pascal does not require or explicitly forbids semicolon before end keyword.


See also automatic semicolon insertion in JavaScript, and conditional permission to omit closing <p> tags in HTML.

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe...

https://html.spec.whatwg.org/multipage/grouping-content.html...


Pascal is fully self-consistent here: in it, semicolon is a statement separator, not a statement terminator. Since the statement before "end" is the last one in the block, there's no statement to separate it from with a trailing semicolon, and so it's a syntax error.


Pascal permits a null production for the statement grammar.

    simple-statement = 
              empty-statement 
            | assignment-statement
            | procedure-statement
            | goto-statement .

    empty-statement = .
from http://www.pascal-central.com/iso7185.html#6.8%20Statements (ISO 7185 Pascal)

In practice the separator-vs-terminator distinction mostly shows up in if-statements:

  if foo then
     bar
  else
     baz;
I believe that anywhere else in a statement context, you can put in as many extra ';' as you like and it won't make a difference. And of course you can drop the final ';' before 'end' or 'until'.


It's not a syntax error.


Correct - the redundant semi-colon denotes an empty statement.


In those day when moving cursors with full screen editor (which is Not vi or Emacs), how many hours of my life wasted on this deletion of semicolons. Sigh.

Still I actually struggled each time this given not exactly sure I am in English or American camp.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: