> >1. Semicolons at the end of declarations simplify parsing of the > >language - not only for recognition, but also for error detection, > >making it possible to give good error messages. > > > This is hardly a good reason for introducing them. > Easiness-of-implementation considerations should not > influence the design of a language, IMHO. That's nothing to do with ease of implementation. You can only give good error messages (and recover to report multiple errors in a single run) if the language has sufficient redundancy. That's a question of language design, not of how clever the implementation is. Redundancy in language syntax (as with any other kind of input data) leads to better error detection. Without semicolons, when you write something like import schema "ns.uri" "location.uri" +3 you are going to get the error message *** Type error: Cannot add a string and an integer while import schema "ns.uri" "location.uri" 3 will give you *** Unexpected token "3" beyond end of expression With semicolons, the construct import schema "ns.uri" "location.uri"; +3 will give you the much clearer error message *** Syntax error: Expected 'at' or ';', found string literal "location.uri" Michael KayReceived on Monday, 26 April 2004 14:35:23 GMT
This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 8 January 2008 14:14:08 GMT