home *** CD-ROM | disk | FTP | other *** search
- Xref: sparky comp.compilers:1557 comp.human-factors:2217
- Path: sparky!uunet!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!rutgers!faatcrl!iecc!compilers-sender
- From: tmb@arolla.idiap.ch (Thomas M. Breuel)
- Newsgroups: comp.compilers,comp.human-factors
- Subject: Re: language design tradeoffs
- Keywords: C, macros, design
- Message-ID: <92-09-075@comp.compilers>
- Date: 14 Sep 92 19:45:12 GMT
- References: <92-09-048@comp.compilers> <92-09-066@comp.compilers>
- Sender: compilers-sender@iecc.cambridge.ma.us
- Reply-To: tmb@arolla.idiap.ch (Thomas M. Breuel)
- Followup-To: comp.compilers
- Organization: IDIAP (Institut Dalle Molle d'Intelligence Artificielle Perceptive)
- Lines: 24
- Approved: compilers@iecc.cambridge.ma.us
-
- 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.
- --
- Send compilers articles to compilers@iecc.cambridge.ma.us or
- {ima | spdcc | world}!iecc!compilers. Meta-mail to compilers-request.
-