Re: language design tradeoffs

tmb@arolla.idiap.ch (Thomas M. Breuel)
Mon, 14 Sep 1992 19:45:12 GMT

          From comp.compilers

Related articles
language design tradeoffs kotula@milli.cs.umn.edu (1992-09-07)
Re: language design tradeoffs torbenm@diku.dk (1992-09-08)
Re: language design tradeoffs nr@dynastar.Princeton.EDU (1992-09-09)
Re: language design tradeoffs raveling@Unify.com (1992-09-11)
Re: language design tradeoffs weberwu@inf.fu-berlin.de (1992-09-13)
Re: language design tradeoffs rob@guinness.eng.ohio-state.edu (1992-09-14)
Re: language design tradeoffs tmb@arolla.idiap.ch (1992-09-14)
Re: language design tradeoffs macrakis@osf.org (1992-09-15)
Re: language design tradeoffs jlg@cochiti.lanl.gov (1992-09-15)
Re: language design tradeoffs anw@maths.nott.ac.uk (1992-09-16)
Re: language design tradeoffs drw@euclid.mit.edu (1992-09-16)
Re: language design tradeoffs rob@guinness.eng.ohio-state.edu (1992-09-17)
Re: language design tradeoffs bromage@mullauna.cs.mu.OZ.AU (1992-09-17)
[28 later articles]
| List of all articles for this month |

Newsgroups: comp.compilers,comp.human-factors
From: tmb@arolla.idiap.ch (Thomas M. Breuel)
Organization: IDIAP (Institut Dalle Molle d'Intelligence Artificielle Perceptive)
Date: Mon, 14 Sep 1992 19:45:12 GMT
Followup-To: comp.compilers
References: 92-09-048 92-09-066
Keywords: C, macros, design

raveling@Unify.com (Paul Raveling) writes:


      Actually I like the idea of using EOL rather than ;. It eliminates a
      cause of several common errors in compilation that need not happen, and it
      need not have particularly adverse side effects.


      Here's one example of a human factors trap in C that wouldn't be there
      without ';'. The key is C's syntax definition for <statement> -- either
      one simple statement terminated by ';' or a sequence of simple statements
      surrounded by {}'s. [... macro example deleted ...]


This is a misfeature of C that comes about because of a conspiracy between
poorly chosen "if" syntax and poorly chosen macro semantics. It is not
very much related to how you terminate your statements (in fact, I could
imagine similar problems if you chose EOL as your statement terminator).


In my experience, explicitly terminating statements with something like
";", or even better, explicitly bracketing each statement (as in Lisp), is
the most effective syntax for protecting you from typos and slips.


Thomas.
--


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.