[Oberon] erroneous hiding procedures in programmer's text editor v2.1

Richard Hable informujo at aon.at
Tue Dec 24 17:28:55 CET 2013


On 12/24/13 02:47, Chris Burrows wrote:

> I read Felix's message differently. The key phrase was: 'provided that the
> EBNF is adapted accordingly'. Consequently if the syntax definition of the
> language was changed so that semicolons are optional or eliminated
> altogether then it would no longer be a syntax error if they were missing.

OK, but if we change the EBNF then it isn't Oberon anymore. :)

I think, Niklaus Wirth responded to the subject of semicolons one day, 
saying that they teach us to be precise.

> It is an interesting observation. I recall when I was wet behind the ears
> (back in the 1970's) as a newcomer to Pascal. The compiler kept on telling
> me 'semicolon required' - my irritated response was "Well, if you are
> expecting one, why don't you put it in for me?" Fortunately, unlike the poor

I had the same experience with Pascal. However, the Oberon syntax is 
simpler: all one has to remember is that statements have to be 
separated by semicolons.

This is a lot simpler both for the compiler and the programmer than 
e.g. in Scala, where semicolons between lines are optional and the 
following rules apply (according to scalass.com/en/basic/semicolon.html):

By default, a line ending is as a semicolon, which is a statement ending.
A statement is considered not end when
- The line ends in the middle of parentheses() or brackets[]
- The line ends in a word that not valid as the end of a statement, 
such as infix operators (+, -, *, / ...)

Richard






More information about the Oberon mailing list