home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / lang / cplus / 19836 < prev    next >
Encoding:
Text File  |  1993-01-24  |  2.3 KB  |  48 lines

  1. Newsgroups: comp.lang.c++
  2. Path: sparky!uunet!panther!mothost!lmpsbbs!mcil.comm.mot.com!davidk
  3. From: davidk@mcil.comm.mot.com (David Kramer)
  4. Subject: Re: Need help justifying C++ over Ada
  5. Organization: Motorola Communications Israel Ltd., Tel Aviv
  6. Date: Sun, 24 Jan 1993 13:21:49 GMT
  7. Message-ID: <1993Jan24.132149.16453@lmpsbbs.comm.mot.com>
  8. References: <1993Jan12.223715.22865@nosc.mil> <GALLINAT.93Jan18105916@dana.sono.uucp> <1993Jan19.073720.23450@lmpsbbs.comm.mot.com> <1993Jan21.130427.12611@afit.af.mil>
  9. Sender: davidk@comm.mot.com (David Kramer)
  10. Nntp-Posting-Host: 145.9.18.30
  11. Lines: 35
  12.  
  13. In article <1993Jan21.130427.12611@afit.af.mil>, cbrooks@afit.af.mil (Christopher L Brooks) writes:
  14. |> davidk@mcil.comm.mot.com (David Kramer) writes:
  15. |> > - With C++ you can easily plug in already existing C code - including
  16. |> >   #include files.
  17. |> 
  18. |> I'm not sure whether your argument here is re-use/modification or just
  19. |> interfacing.  We've never had any problems here talking to C or C++
  20. |> from Ada - in fact, we do it all the time.  We've always found it
  21. |> easiest to make the Ada program the "main" program however.
  22. |> 
  23.  
  24. Ada does make it easy to interface with object files of other languages.
  25. What I was refering to (and I admit I did not make myself clear) is the
  26. ability to use/reuse existing definitions (#defines, enums, structs, 
  27. typedefs...) directly. 
  28.  
  29. For instance, I worked on a project which was developed in C where all the
  30. definitions that were used to interface to an external program were defined 
  31. in one .h file. I wrote a simulator in C++ for the other side of that interface,
  32. and was able to use that .h file directly. This insured that both sides
  33. of the interface would have consistant definitions and that if something
  34. changed in the definitions 'make' would rebuild both programs. 
  35.  
  36. If I wanted to write the simulator in Ada I would have had to rerepresent
  37. those definitions in Ada - which would complicate maintenance (a change to
  38. the .h file would necesitate a change to the Ada code).
  39.  
  40. Personally, I would prefer Ada for most applications. But the advantages 
  41. of C++ sometimes outweigh other considerations.
  42.  
  43. -- 
  44. [  David Kramer                       |  INTERNET: davidk@mcil.comm.mot.com  ]
  45. [ Motorola Communications Israel Ltd. |  Phone (972-3) 565-8638 Fax 565-8754 ]
  46.  
  47.  
  48.