Re: Syntax of Comments (was: language design tradeoffs)

crowl@jade.cs.orst.edu (Lawrence Crowl)
Thu, 24 Sep 1992 06:21:56 GMT

          From comp.compilers

Related articles
[2 earlier articles]
Re: Syntax of Comments (was: language design tradeoffs) moss@cs.umass.edu (1992-09-23)
Re: Syntax of Comments (was: language design tradeoffs) firth@sei.cmu.edu (1992-09-23)
Re: Syntax of Comments (was: language design tradeoffs) tmb@arolla.idiap.ch (1992-09-23)
Re: Syntax of Comments (was: language design tradeoffs) jlg@cochiti.lanl.gov (1992-09-23)
Re: Syntax of Comments (was: language design tradeoffs) jimc@tau-ceti.isc-br.com (1992-09-24)
Re: Syntax of Comments (was: language design tradeoffs) crowl@jade.cs.orst.edu (1992-09-24)
Re: Syntax of Comments (was: language design tradeoffs) crowl@jade.cs.orst.edu (1992-09-24)
Re: Syntax of Comments (was: language design tradeoffs) beshers@hks.com (1992-09-24)
Re: Syntax of Comments (was: language design tradeoffs) macrakis@osf.org (1992-09-24)
Re: Syntax of Comments (was: language design tradeoffs) fjh@munta.cs.mu.OZ.AU (1992-09-24)
Re: Syntax of Comments (was: language design tradeoffs) delacour@parc.xerox.com (Vincent Delacour) (1992-09-24)
Re: Syntax of Comments (was: language design tradeoffs) macrakis@osf.org (1992-09-25)
Re: Syntax of Comments (was: language design tradeoffs) de19@umail.umd.edu (1992-10-04)
[6 later articles]
| List of all articles for this month |
Newsgroups: comp.compilers,comp.human-factors
From: crowl@jade.cs.orst.edu (Lawrence Crowl)
Organization: Oregon State University, Corvallis Oregon
Date: Thu, 24 Sep 1992 06:21:56 GMT
References: 92-09-048 92-09-157
Keywords: C, parse, syntax

the moderator writes:
>[Many in the C++ crowd claim that "const" declarations in combination with
>in-line functions and sensible optimization of "if" statements that depend on
>constants give you nearly everything CPP does without the aggravation of C's
>two-level syntax. -John]


The "constant if condition" approach has two problems.


First, consider the "Whatzit" system. It has a "foobar" routine that I've
got to call to get my program to work. No other system has the "foobar"
routine, so if the parser routinely type checks the code, the compilation
will fail on every other system. We can get around this by doing constant
evaluation of conditions before type checking the body. Unfortunately,
this delays the recognition of errors.


Second, the body must be syntactically correct in order to parse
successfully. For most code, this shouldn't be a problem. Unfortunately,
there are some syntactic differences that will arise in systems. The
"shared" storage class of Sequent C comes to mind.


I don't like the C preprocessor for many reasons. However, it does
provide a cheap work-around to many problems dealing with real systems.
Viable alternatives always seem to imply configuration management systems,
language support for generics, etc.
--
    Lawrence Crowl 503-737-2554 Computer Science Department
crowl@cs.orst.edu Oregon State University
...!hplabs!hp-pcd!orstcs!crowl Corvallis, Oregon, 97331-3202
--


Post a followup to this message

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