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