LWN.net Logo

Why use C?

Why use C?

Posted Jul 10, 2012 9:03 UTC (Tue) by anselm (subscriber, #2796)
In reply to: Why use C? by Cyberax
Parent article: Why learn C? (O'Reilly Radar)

Pascal compilers are even easier. Yet Pascal was never really successful.

Yes, but that didn't have anything to do with the compiler – it was really because, unlike C, Pascal was originally supposed to be a teaching language, and lacked many important features it would have needed to succeed in the »real world«, like the idea of libraries or a workable string type. Pascal in its original, official form as described by Jensen and Wirth was good for writing toy programs but not a lot else.

Many of the missing features were added after the fact by various Pascal implementations, but there was little if any standardisation of these extensions. When Donald E. Knuth implemented the second version of TeX in the early 1980s, he solved that problem by basically inventing a new language, WEB, that compiled to his system's version of Pascal, but he still had to jump through various fiery hoops to make that work. (The first version of TeX had been written in a different language altogether.)

As a matter of fact, also in the 1980s Niklaus Wirth, the inventor of Pascal, came up with an improved version of Pascal called Modula-2, which corrected some of the more egregious errors and oversights of the original and was in fact intended to be a language for serious development. However, by that time everybody was becoming sold on the idea of OOP, which Modula-2 quite intentionally didn't support, so that language didn't really go anywhere, either.


(Log in to post comments)

Why use C?

Posted Jul 10, 2012 11:59 UTC (Tue) by dgm (subscriber, #49227) [Link]

From my days of Modula2 and Pascal, I vividly remember the feeling that the languages went through leaps and bounds to -limit- you. In hindsight, it probably is a good idea if what you want to do is code from 9 to 5, and then go home to play with your family. But the fact is that the feeling pissed me off then, and was one of the reasons I preferred C and later C++.

Why use C?

Posted Jul 10, 2012 12:52 UTC (Tue) by Cyberax (✭ supporter ✭, #52523) [Link]

For me, in hindsight, almost none of Pascal's or Modula's limitations make sense. They just seem petty and trivial.

Copyright © 2013, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds