home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!cimshop!davidm
- From: davidm@consilium.com (David S. Masterson)
- Newsgroups: comp.sys.amiga.applications
- Subject: Re: Is SAS C V6 C++ compatible
- Message-ID: <DAVIDM.92Dec19202954@consilium.com>
- Date: 20 Dec 92 04:29:54 GMT
- References: <1992Dec17.090233.26443@sunbim.be> <BzGIpJ.HGy@unx.sas.com>
- <DAVIDM.92Dec18180911@consilium.com> <BzIsJ1.JCr@well.sf.ca.us>
- Sender: root@cimshop.UUCP
- Distribution: comp
- Organization: Consilium Inc., Mountain View, California
- Lines: 91
- In-reply-to: comeau@csanta.attmail.com's message of 19 Dec 92 18:54:37 GMT
- X-Posting-Software: GNUS 3.13 [ NNTP-based News Reader for GNU Emacs ]
-
- >>>>> On 19 Dec 92 18:54:37 GMT, comeau@csanta.attmail.com (Greg Comeau) said:
- > Originator: comeau@well.sf.ca.us
-
- Good to see you reading the Amiga stuff for C++ references, Greg. I kind of
- hoped my message would pull you out of the background... ;-)
-
- > In article <DAVIDM.92Dec18180911@consilium.com> davidm@consilium.com (David
- > S. Masterson) writes:
-
- >> Therefore, a C++ to C translator would not produce as efficient code as a
- >> native C++ compiler
-
- > We're looking at a mixed bag issue here. In theory, a native code producing
- > C++ is supposed to generate better code. In reality, that isn't true, nor
- > will it probably ever be.
-
- [...]
-
- > Just to demonstrate some of this: earlier this year we received a review of
- > Comeau C++ 3.0 With Templates while it was still in beta in Open Systems
- > Today! magazine. Not only was the reviewer surprised that Comeau C++ was
- > able to compiler faster than some of the native code compilers, but that the
- > object code generated by Comeau C++ was not slower (in fact I think we were
- > faster and smaller in some tests). And to make this even more meaningful,
- > the reviewer had the nerve ;-) to turn on the optimizer switched for the
- > native compilers, but explicitly did not do so for the back end C compiler
- > (Sun C as this was reviewed on the SPARC) that was accepting Comeau C++'s
- > output "C object code".
-
- That's good, but was it an apples to apples comparison (were they all C++ 3.0
- compatible compilers)? Although there were many new things added to C++ in
- the AT&T 3.0 version (most notably templates), but did it also improve on the
- type of C code it produced?
-
- >> (or so Steve Clamage of Taumetric Corp. and vice-chairman of the C++
- >> standardization committee claims). I'm not a compiler writer, so I
- >> certainly can't back up this statement.
-
- > So long as this is on the table:
- > * Steve just recently resigned.
- > * I am a compiler writer.
- > * I am a voting and attending member of X3J16, the ANSI C++ committee
- > * As radiated above, I don't necessarily dispute Steve's claims, but in
- > a way, the proof is in the pudding as well as in the textbook.
-
- True. I guess the question is (and I should probably be asking this in
- comp.lang.c++) whether there are types of C++ programs that will compile
- better on native code compilers and types that will compile better on C++ to C
- compilers? I would assume that the C++ to C compiler will generate the best
- code possible for a ANSI-C compilers, but will always have to hope that the
- back-end C compiler will be able to pick up the context information that the
- C++ compiler found (of course I mean in a C sense).
-
- >> I think C++ could be a good language for the Amiga provided the
- >> implementation is a good one.
-
- > Our customers seem to feel that way. The main thing missing right now is an
- > Amiga class library.
-
- It's been a couple of strange months for me, but I plan to look at some of the
- standard libraries (NIHCL, COOL, and OATH) to see if I can get themn to work
- on my relatively stock Amiga. After that, maybe I can begin building a more
- Amiga specific library.
-
- >> What is most needed in the implementation of C++ (on any system) is the
- >> exception handling capability. Until compiler writers start putting out
- >> C++ with that capability, the market for vendors of reusable components
- >> will be hampered as exception handling *will* completely change the style
- >> in which objects are developed.
-
- > Maybe. This does not mean that the feature should not be made available
- > though.
-
- Agreed. Exception handling *is* needed. What I meant by how will change C++
- programming style is in the methods used for modeling. As an example, in a
- current development, I've built a Transaction class as a wrapper around a
- series of database operations. Without exception handling, I (almost) have to
- put in methods to Start() and Commit() the transaction as well as handle
- cleanups specially in the face of errors. With exception handling, I could
- put most work in the ctor/dtor and throw exceptions when problems occur. The
- "look and feel" of the object is very different.
- --
- ====================================================================
- David Masterson Consilium, Inc.
- (415) 691-6311 640 Clyde Ct.
- davidm@consilium.com Mtn. View, CA 94043
- ====================================================================
- Our record alone won't cut it.
- -- White House Chief of Staff Sam Skinner to his
- staff, on the importance of negative campaigning in
- the 1992 election.
-