home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / os / vms / 20372 < prev    next >
Encoding:
Internet Message Format  |  1993-01-05  |  7.4 KB

  1. Path: sparky!uunet!cs.utexas.edu!zaphod.mps.ohio-state.edu!moe.ksu.ksu.edu!mccall!mccall!tp
  2. Newsgroups: comp.os.vms
  3. Subject: re: VAX c
  4. Message-ID: <1993Jan5.121034@mccall.com>
  5. From: tp@mccall.com (Terry Poot)
  6. Date: Tue,  5 Jan 1993 12:10:34 CST
  7. Reply-To: tp@mccall.com (Terry Poot)
  8. References: <9212282111.AA11260@uu3.psi.com> <1hs23kINNnqs@gap.caltech.edu> <4JAN199309361642@jhuvms.hcf.jhu.edu>
  9. Organization: The McCall Pattern Co., Manhattan, KS, USA
  10. Nntp-Posting-Host: mis1
  11. Nntp-Posting-User: tp
  12. Lines: 132
  13.  
  14.  
  15. In article <4JAN199309361642@jhuvms.hcf.jhu.edu>, ecf_stbo@jhuvms.hcf.jhu.edu
  16. (Remember Grimalkin) writes:
  17. >This discussion just reinforces my belief that C is an unacceptable language
  18. >because the run time library has to emulate unix, regardless of the OS. I
  19. >have seen C take over as 'this weeks language' and I just don't understand it.
  20. >Why in hell are so many people using C on VMS? 
  21.  
  22. Because FORTRAN, COBOL, Pascal, PL/I, and Basic suck? To paraphrase someone
  23. else, it's the worst language in the world, except for the rest of them. 
  24.  
  25. But to directly answer your question, I use C because I require a portable
  26. language (meaning that most of my code can be portable, and most any platform I
  27. might ever run on has a reasonably compatible implementation of the language
  28. with vendor or equivalent support and native platform debugger support) with
  29. modern control structures and data structures, and dynamic memory
  30. allocation/deallocation. As far as I know, C is IMHO the only language that
  31. meets these criteria (many of which are admittedly subjective). Since I made
  32. that decision, embedded SQL support and convenient access to Xlib, Xt, and Motif
  33. APIs have been added to that list of requirements, and I'm more pleased than
  34. before with my choice.
  35.  
  36. BTW, the choice came about in both of my last 2 jobs, on different platforms,
  37. and happened to come out the same. The previous job was a mixed Harris VOS/unix
  38. shop.
  39.  
  40. I expect to transition eventually to C++, but it does not currently meet the
  41. above criteria to the best of my knowlege (which is limited at this time, I
  42. freely admint).
  43.  
  44. >Why would you want to hose your
  45. >performance running through 14 levels of emulation attempting to (and often
  46. >failing) make the rtl conform to every little idiosyncrasy of one particular
  47. >system? 
  48.  
  49. a) I don't do enough I/O in most of my applications for the degradation to
  50. amount to a hill of beans.
  51.  
  52. b) The key word in least common denominator is still _common_. If you don't care
  53. about portability, use RMS directly and avoid all that emulation. This isn't a
  54. language issue per se. Any portable API will have to define an I/O model, and
  55. there will be some systems it doesn't fit well on. As it happens, the industry
  56. has settled on the unix I/O model. 
  57.  
  58. Personally, I think it's a good choice, as it is about as simple a model as you
  59. can get (simple byte stream). The problems with the VMS RTL (and yes, that is
  60. where they are) are bad design, and the need to try to extend this model to
  61. support the VMS I/O model. If you never use anything but stream files, you won't
  62. have much trouble with I/O. You'll still have some, because VMS doesn't really
  63. support stream files. 
  64.  
  65. If you need something that is intrinsically not a stream file, you might as well
  66. use RMS directly, because it isn't portable anyway. In cases other than I/O, I
  67. certainly don't use the unix emulation, because it isn't any good. I isolate
  68. that code to a module that will be rewritten if I port. For instance, I use
  69. lib$spawn, lib$do_command, lib$run_program, lib$set_logical, callable TPU, etc.
  70. There isn't a portable way to do what I want, so I isolate the code and do it in
  71. a way that makes sense. It's still in C, but I avoid the RTL where it's broke or
  72. insufficient.
  73.  
  74. >I mean, is it a management decree based on 'marketing related
  75. >concerns'? Is it for 'portability' (seems like the typical C program depends
  76. >on
  77. >such exact unix behavior that this portability is just a myth touted by people
  78. >running unix. Christ, look at the contortions the guy who ported XV had to go
  79. >through)? 
  80.  
  81. I ported the entire PBMplus suite in probably under 15 man-hours. Most of that
  82. work consisted of coping with the fact that VMS doesn't support pipes, and
  83. developing build procedures, which had nothing to do with language issues. A few
  84. problems showed up because VAX C isn't ANSI compliant, but except for the pipe
  85. problem, it pretty much dropped in and ran. I don't know what the problems with
  86. XV were, so I can't comment on that. I ported YACC. It took a one line change to
  87. a file name. I ported Ghostview. Again, the problems were pipes and environment
  88. variables. 
  89.  
  90. I've ported Fortran code from system to system (professionally). It takes a LOT
  91. more work. It's one of the reasons I chose C. The typical C program is generally
  92. quite easy to port (ease is relative, of course). The trouble spots are file and
  93. directory manipulation in unusual ways, and pipes forks and execs (the biggies).
  94. These aren't features of the C language per se. They could be done better in the
  95. VAX C RTL than they have been.
  96.  
  97. In my case, it is a "mangement decree" (I'm a manager) based on productivity.
  98.  
  99. >The latest ante in the game (but one that could be predicted given the way
  100. >things are going) is this abomination called VMS POSIX 
  101.  
  102. Other than detesting anything that looks like unix, why do you consider it an
  103. abomination to be able to run progrms from other systems? Do you prefer
  104. proprietary systems? Once POSIX works well, we'll have access to a great deal
  105. more software than we do now. You see this as a drawback?
  106.  
  107. >(I won't even start
  108. >about 'OpenVMS'). 
  109.  
  110. Pure BS until POSIX works well.
  111.  
  112. >It sure would be nice if there was some non-biased attempt at
  113. >environment interoperability, but I guess we're gonna be stuck with 'If you
  114. >can't beat 'em, join 'em'. 
  115.  
  116. You prefer "If you can't beat them, declare chapter 11"? I guess a non-biased
  117. attempt would be to define an environment that doesn't exist and is equally
  118. different from every other environment so it won't fit easily anywhere. Not much
  119. chance of that succeeding. Or I suppose you could pick one that was so
  120. featureless it'd work anywhere. Of course, that would, by definition, be
  121. useless. Of course, if VMS were tearing up the industry, perhaps it'd be the
  122. standard environment. That would, of course, presupose that all other computer
  123. companies went broke, since that's the only way it could happen, given that it
  124. hasn't been available to anyone but DEC until just recently.
  125.  
  126. >Now it's getting to the point where it's painful
  127. >NOT to use C (example: multinet networking code and gaddam 'sockets'). 
  128.  
  129. A common effect of the proliferation of a standard is to make it difficult not
  130. to abide by the standard. Drive on the other side of the street on your way home
  131. for an illustration. Specifically, the benefit of a standard is that one can
  132. write to it without going through a great deal of pain to work with other
  133. software. Those that buck the standard go through the pain, but everything is
  134. easier for the rest of us.
  135.  
  136. >I
  137. >suppose it would behoove me to start writing everything in C, but something
  138. >is still making me hold out. It's just the PRINCIPLE of the thing!
  139.  
  140. Your choice. But you'll increasingly be pounding square pegs into round holes.
  141. What is the point in doing a lot of extra work just to avoid writing in C?
  142. --
  143. Terry Poot <tp@mccall.com>                   The McCall Pattern Company
  144. (uucp: ...!rutgers!depot!mccall!tp)          615 McCall Road
  145. (800)255-2762, in KS (913)776-4041           Manhattan, KS 66502, USA
  146.