Related articles |
---|
Is C++ really used ? pjmlp@students.si.fct.unl.pt (1997-04-22) |
Re: Is C++ really used ? chase@world.std.com (David Chase) (1997-04-22) |
Re: Is C++ really used ? jacobs@darwin.cwru.edu (Kevin Jacobs) (1997-04-30) |
Re: Is C++ really used ? salomon@silver.cs.umanitoba.ca (1997-05-04) |
Re: Is C++ really used ? krk@cygnus.com (Kim Knuttila) (1997-05-04) |
Re: Is C++ really used ? jlilley@empathy.com (John Lilley) (1997-05-04) |
Re: Is C++ really used ? dwight@pentasoft.com (1997-05-04) |
Re: Is C++ really used ? cdg@nullstone.com (Christopher Glaeser) (1997-05-04) |
Is C++ really used ? peter@bj-ig.de (Peter Brueckner) (1997-05-04) |
Re: Is C++ really used ? danwang@nordica.CS.Princeton.EDU (1997-05-07) |
Re: Is C++ really used ? kbreinho@bsquare.com (Keith L. Breinholt) (1997-05-08) |
Re: Is C++ really used ? geert@sun3.iaf.nl (1997-05-08) |
[10 later articles] |
From: | John Lilley <jlilley@empathy.com> |
Newsgroups: | comp.compilers |
Date: | 4 May 1997 00:22:02 -0400 |
Organization: | Nerds for Hire, Inc. |
References: | 97-04-156 97-04-167 |
Keywords: | C, C++, OOP |
David Chase wrote:
> > Is C++ so bad for compilers, after all I'm using it and it seems
> I worked on one compiler written in C++, and it was a little bit like
> being a subcontractor on the Tower of Babel.
<snip>
The arguments you give are perhaps valid, but not specific to
compilers/parsers. Yes, C++ is complex and tedious, but is does have
some very good features w.r.t. Java (performance, static type
checking, const), and "C" (reasonable type-safety, encapsulation,
readability).
But the real question is "why isn't C++ used for *compilers*". I
offer that the main reason is portabilty. You must bootstrap the
compiler from an existing base. If the compiler is written in C++ and
you want it to be portable across several platforms, it is a nightmare
trying to reconcile the various flavors of C++ that abound. It is
also a bootstrapping problem, and it is more likely that you will
encounter a viable "C" compiler on whatever system than a viable C++
compiler.
My is verified by the approaches of GNU g++ (which has a mission of
being written only in "C"), and of Edison Design Group (who sell a
very-high-quality, portable C++ front-end written in "C").
I am writing a C++ parser in C++, but it's not for production across
many systems, so I can live with the current limitations.
john lilley
--
Return to the
comp.compilers page.
Search the
comp.compilers archives again.