home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / lang / ada / 2226 < prev    next >
Encoding:
Internet Message Format  |  1992-07-29  |  3.4 KB

  1. Path: sparky!uunet!dtix!darwin.sura.net!wupost!usc!nic!jonesm
  2. From: jonesm@nic.cerf.net (Matthew Jones)
  3. Newsgroups: comp.lang.ada
  4. Subject: Re: Review of "Ada & C++: A Business Case Analysis
  5. Message-ID: <2408@nic.cerf.net>
  6. Date: 29 Jul 92 14:51:23 GMT
  7. References: <2329@nic.cerf.net> <1992Jul28.213215.25806@fcom.cc.utah.edu> <1992Jul29.074434.21817@lmpsbbs.comm.mot.com>
  8. Distribution: usa
  9. Organization: CERFnet
  10. Lines: 55
  11.  
  12. In article <1992Jul29.074434.21817@lmpsbbs.comm.mot.com> davidk@mcil.comm.mot.com (David Kramer) writes:
  13. >
  14. >For one thing, Ada has a realtime paradigm built into the language. You can't
  15. >have a realtime application without some means of interprocess communication.
  16. >There is no commercially available C++ compiler today that I know of (and I've
  17. >been looking) that allows for interprocess communication (by that I mean the
  18. >ability to pass messages and object pointers between two C++ processes). So
  19. >unless you modify the compiler or go through great pains to write your own
  20. >mechanisms you cannot use C++ for a realtime application!
  21.  
  22. C (and C++) is not an operating system, real time or other. There are many 
  23. real time operating systems available, usually tied to the hardware
  24. (ie VxWorks or OS9 for the 68k family...). This way seems much more sensible 
  25. to me than the Ada "we can solve everyones real time requirements on
  26. all hardware with one paradigm." Also you might consider that many
  27. people have found the Ada tasking model to be implemented very 
  28. poorly by the Ada vendors. Many people even in this group advocate
  29. using the Unix process or threads interprocess paradigm (or other options
  30. than Ada tasking) because the Ada tasking
  31. model is so often a failure. Finally you might consider that Unix
  32. (and the myriad of real time knockoffs) have plenty of (real time)
  33. interprocess features and since C is often developed for some sort of
  34. Unix (or real time) box there is a default standard of sorts. 
  35.  
  36. >Also, for most serious real-time applications the runtime constaint checking
  37. >and exception handling that Ada provides is crucial in providing a reliable
  38. >system that is able to respond well to unpredictable and unexpected situations.
  39. >Yes, C++ will  provide exception handling in the future, but today that is  not
  40. >part of the language, and even when it will be, all runtime checks will have to
  41. >be explicit in the code.
  42.  
  43. Interesting point. I am not sure if I agree or not. One has to consider among
  44. other things that some people suppress checks in a deliverable system
  45. (for speeds sake) and that exceptions can cause errors by making the structure
  46. of the code more complicated, because exceptions are kind of like a nonlocal goto
  47. (Exception handling reminds me of the use of the Unix C library function setlj,
  48. in terms of lodgic flow).
  49.  
  50. >Finally, the C philosphy of 'give the programmer freedom at the expense of
  51. >safety because he knows what he's doing' is continued to a great degree in
  52. >C++ as well. While this might be acceptable in many applications, most real-time
  53. >applications cannot afford this luxury.
  54.  
  55. Or ...C/C++ gives a programmer the freedom to chose the
  56. best real time paradigm (operating system) for the job, rather than
  57. requiring the same paradigm for everyone everywhere.
  58.  
  59. I do admit you make some good points. Also I think a POSIX real time
  60. extensions standard will benefit everyone, C and Ada a like. And
  61. just as note:
  62. for C (but not as far as I know C++) there is a tasking extension
  63. called ConcurrenC (sp?).
  64.  
  65. Matthew Jones
  66. jonesm@cerf.net
  67.