home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / comp / programm / 2608 < prev    next >
Encoding:
Internet Message Format  |  1992-09-14  |  2.1 KB

  1. Path: sparky!uunet!gatech!ncar!noao!amethyst!organpipe.uug.arizona.edu!news
  2. From: dave@cs.arizona.edu (Dave Schaumann)
  3. Newsgroups: comp.programming
  4. Subject: Re: Pascal vs C
  5. Message-ID: <1992Sep15.042630.10944@organpipe.uug.arizona.edu>
  6. Date: 15 Sep 92 04:26:30 GMT
  7. References: <HBF5qB1w164w@oneb.almanac.bc.ca>
  8. Sender: news@organpipe.uug.arizona.edu
  9. Reply-To: dave@cs.arizona.edu (Dave Schaumann)
  10. Organization: University of Arizona
  11. Lines: 36
  12. In-Reply-To: nimcompu@oneb.almanac.bc.ca
  13.  
  14. In article <HBF5qB1w164w@oneb.almanac.bc.ca>, nimcompu@oneb writes:
  15. >Ok.  I'm just one of thos guys that is just comming onto the programming 
  16. >scene.  I have gone through what I think is quite a bit of Pascal.  But what 
  17. >I would like to know is whick language (Pascal or C) is better for 
  18. >programming in and why.
  19.  
  20. Pascal was designed as a teaching language, and C was designed to write
  21. systems programs (compilers, operating systems, etc).  This has had a
  22. profound effect on the design decisions that went into each language.
  23.  
  24. Pascal was made easy to learn by leaving out features that make it easy
  25. to shoot yourself in the foot.  Unfortunately, these same features
  26. turn out to be useful when it comes time to write complex and robust
  27. code.  You can generally code around the difficulties, but it can be
  28. obnoxious.
  29.  
  30. C, of course, has its own problems.  There are some features (old-style
  31. parameter declaration, the whole declaration syntax, the when-is-a-
  32. typedef-a-typedef problem, etc) that persist mostly for historical
  33. compatability with old programs.  C has a lot of very powerful features,
  34. which are, of course, prone to abuse.
  35.  
  36. C has the advantage of wide-spread availability (tho I can't imagine
  37. that Pascal is /that/ far behind), and a close affinity with the Unix
  38. (tm) environment.
  39.  
  40. Personally, given the choice between Pascal and C, I'd take C every time.
  41. For me, the difficulties that are presented by Pascal's "saftey features"
  42. are just too much of a bother.
  43.  
  44. If you have the choice, you might also consider Modula 2, Modula 3, or
  45. Oberon as alternative Pascal-like languages (which I'm told don't suffer
  46. from the same flaws that Pascal does).
  47.  
  48. -- 
  49. Dave Schaumann            dave@cs.arizona.edu
  50.