home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / sys / amiga / applicat / 9539 < prev    next >
Encoding:
Internet Message Format  |  1992-12-21  |  5.1 KB

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