On 2015-01-28 23:27, Walter Bright wrote:

For example, people often realize that the ; statement terminator is
redundant, so they propose removing it. In trying it, however, it soon
becomes clear that error message clarity, recovery, and the correct
identification of the location of the error degrades substantially.

So consider:

     void func()
     safe T = 7;

With your proposal, an error isn't discovered until the '=' is found.

A good language design that doesn't require the ; statement terminator would recognize "void func()" as a valid statement and implicit add ;. Scan the line, if a valid language construct has been seen at the end of the line, insert a ;, if not continue to the next line. That works in many languages.

--
/Jacob Carlborg

Reply via email to