Why is "C is available everywhere" it seems this discussion about C has missed this critical point and I wonder why ?
OK the answer "C" major design point was to write a language that was easy to build a compiler for thus "C" was the most successful language to be ported to new hardware out there. Because it had no strong copyrights and easy to use compiler tools like Lex, Yacc it was successful. The language it's self is no big deal, but the portability was.
I'm amazed that no one in this long discussion pointed this 1 big fact out "C" became popular not because it was better , but because it was there and that was due to it's major design point, it was easy to build a compiler for. I guess programmers don't know history well.
Posted Jul 6, 2012 14:37 UTC (Fri) by Cyberax (✭ supporter ✭, #52523)
[Link]
Pascal compilers are even easier. Yet Pascal was never really successful.
Why use C?
Posted Jul 6, 2012 15:16 UTC (Fri) by jflasch (guest, #5699)
[Link]
"C" gave away the yacc and lex syntax Pascal was based on ALGOL 60 which was not so easy of a language, Pascal was highly popular as a PC language but the Unix world never came to it, so I guess "C" also had this Unix bias that kept it going along with easy porting. GCC was a large part of the porting thing, of course. It's funny that the GNU pascal compiler is written in C, then so is Perl and how many other languages , I still think this was more about compilers (IE being there) then syntax.
Why use C?
Posted Jul 6, 2012 17:37 UTC (Fri) by BlueLightning (subscriber, #38978)
[Link]
Pascal compilers are even easier. Yet Pascal was never really successful.
Depends how you define successful. Delphi was quite a successful, at least in terms of people using it to produce real software, and that was based on Pascal.
Why use C?
Posted Jul 10, 2012 9:03 UTC (Tue) by anselm (subscriber, #2796)
[Link]
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.
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.