|[27 earlier articles]|
|Re: language design tradeoffs nickh@CS.CMU.EDU (1992-09-21)|
|Re: language design tradeoffs firstname.lastname@example.org (1992-09-21)|
|Re: language design tradeoffs raveling@Unify.com (1992-09-21)|
|Re: language design tradeoffs email@example.com (1992-09-22)|
|Re: language design tradeoffs firstname.lastname@example.org (1992-09-22)|
|Re: language design tradeoffs email@example.com (1992-09-22)|
|Re: language design tradeoffs firstname.lastname@example.org (1992-09-23)|
|Re: language design tradeoffs email@example.com (1992-09-23)|
|Re: language design tradeoffs firstname.lastname@example.org.OZ.AU (1992-09-24)|
|Re: language design tradeoffs email@example.com (1992-09-24)|
|Re: language design tradeoffs firstname.lastname@example.org (1992-09-24)|
|Re: language design tradeoffs chased@rbbb.Eng.Sun.COM (1992-09-25)|
|Re: language design tradeoffs email@example.com (1992-09-26)|
|[1 later articles]|
|From:||firstname.lastname@example.org (Thomas M. Breuel)|
|Organization:||IDIAP (Institut Dalle Molle d'Intelligence Artificielle Perceptive)|
|Date:||Wed, 23 Sep 1992 21:07:24 GMT|
email@example.com (Jim Giles) writes:
|> [...] Language design should strive to choose syntax that
|> decreases the likelihood of such misunderstandings. Notational economy
|> doesn't necessarily make a language effective at achieving this goal, and
|> it may even hurt.
Exactly. That's why I recommend that statements should be explicitly
terminated (preferably with *either* semicolon or EOL), even though I
recommend that the statement syntax should be designed so that they can be
distinguished without such termination. However, there is no evidence
that requiring a semicolon *always* (just to avoid the rare use of a
continuation marker) is an improvement. In fact the only evidence
available tends to the other conclusion - that EOL *should* be the usual
statement terminator. Whether you consider this evidence strong or weak,
it's the only evidence there is.
Intuitively, I like semicolons for terminating statements, so "weak
evidence" doesn't convince me.
Furthermore, you keep claiming that long statements are rare, citing some
piece of commercial C code that you checked. Maybe that's true for that
particular style. I find them to be frequent in my C code; a continuation
marker wouldn't be "rare" and it would be a nuisance. In other languages,
long statements are the norm, not the exception, regardless of style.
So, whether EOL is a good choice for statement termination also depends on
style and on the language. For languages like BASIC, FORTRAN, and the
shell, it's a good choice. For C/C++, it depends very on your style and
your application, and for languages like Lisp and SML, it would most
likely be a bad choice.
Generally, the more descriptive (longer) your variable names are and the
more functional your programming style gets, the longer your "statements"
will end up being.
Of course, if you write traditional FORTRAN style (as I suspect you may)
you don't have much need for long statements. But please don't generalize
from your style and your experiences to "good language design" in general.
PS: If you do want statements to be terminated automatically in C, you
might want to use one of the "electric" C modes for GNU Emacs.
Return to the
Search the comp.compilers archives again.