NO

Author Topic: The reasons behind C's success ?  (Read 6666 times)

andre104

  • Guest
The reasons behind C's success ?
« on: March 31, 2008, 09:17:48 AM »
As we all know, C is still a popular language.
Lots of free/open source projects are written in C.

Yet before C there's already another language : Pascal.
AFAIK, it's more/less technically equivalent to C.

But why did C steal the spotlight ?
Is it due to AT&T and the development of UNIX ?

I'm not interested in raising the "C vs Pascal" flame war, anyway :)
I'm more interested to historical reasons (or some little technical reasons are OK  :) )

Offline Christian

  • Administrator
  • Member
  • *****
  • Posts: 142
    • http://www.pellesc.de
Re: The reasons behind C's success ?
« Reply #1 on: March 31, 2008, 10:26:45 PM »
I think, that the development of Windows was a part of the success of C, because Windows and the Winapi has been developed in C. (Only an idea  8) )
www.pellesc.de - German PellesC mirror (now available in german and english)

Romashka

  • Guest
Re: The reasons behind C's success ?
« Reply #2 on: March 31, 2008, 10:49:39 PM »
I disagree that Windows played any major role.
I think C became successful long before Windows 1.0 arrived.
And I think Unix was what made C very popular for system programming.
Also, IMHO Pascal, Modula etc. compilers were lacking in terms of quality and choice of alternatives at that moment.
On the other hand Ada was not intented for "mainstream" usage and the requirement for every Ada compiler to pass tests to be allowed to bear the name "Ada compiler" has played a role in availability of (cheap/free) compilers for it.
IMO C become popular not because it was better (though I don't say it was worse) but because it got adopted by Unix (and then DOS and Windows) and it was easier for programmers to write software in a language that had native C library and other support in OS.

(everything is just my opinion, and I don't declare it's objective :))

severach

  • Guest
Re: The reasons behind C's success ?
« Reply #3 on: April 01, 2008, 06:39:35 AM »
C adapts well for multiple platforms so it's used for writing the OS. When the OS is written in C, coding for that OS is easiest in C.

>AFAIK, it's more/less technically equivalent to C.

Maybe now that Pascal has adopted many C like features. Pascal still needs a lot more C stuff before it's a serious contender for C.

* integer sizes that adapt to processor
* preprocessor as standard issue
* overflows must not cause exceptions
* arrays and pointers must be largely interchangeable

I developed a short program in Pascal and found ways around pretty much all of Pascal's limitations. When I translated it all over to C it was like a breath of fresh air. All of that Pascal help was only getting in my way.

Romashka

  • Guest
Re: The reasons behind C's success ?
« Reply #4 on: April 07, 2008, 10:05:15 PM »
* integer sizes that adapt to processor
* preprocessor as standard issue
* overflows must not cause exceptions
* arrays and pointers must be largely interchangeable
I don't want to start a flame war (and I'm doing a project in C + Lua now), but IMO the issues above are not a problem.
Pascal has the ability of preprocessing (though not standard between different compilers, IIRC), but it's not required as often as for C (for example, there is no need to use things like #include <stdio.h> in Pascal).
Overflows causing exceptions is actually a nice feature, and it can be turned off AFAIR.
And Pascal has some nice (IMO) features that C lacks (and I would love to see more libraries etc. on/for Pascal).
If Pascal would be largely equal to C by features (except the syntax) - it would have much less use.
More languages - more choice.

There are plenty of "C vs Pascal" (even by Kernigan!) and "C/Pascal/<insert-your-favourite> sucks because ..." on the internet, and I must admit they contain some valid points sometimes.