When will C be replaced?
When will C be replaced?
How long do you think it will be before C is replaced by another language? It'd be a shame to write an OS in C then have it replaced by a newer/better language.
Re:When will C be replaced?
History tells us that while languages which don't catch on (Algol, PL/1, Ada, Prolog) disappear quickly, popular or heavily used languages never completely fade; Cobol, Fortran and Lisp still have their partisans, for example. Also, 'better' is less of an issue than 'more popular'; Modula-2 was in many ways an superior to C, but it never caught on largely because of it's verbose Pascal-like syntax and heavy-handed security features. Bliss was another system language comparable to C; unfortunately, it was initially designed for a specific operating system, and was never ported to the PC AFAIK.chris wrote: How long do you think it will be before C is replaced by another language? It'd be a shame to write an OS in C then have it replaced by a newer/better language.
<flame>
In the 1980s, the popularity of C as a systems language had caused it to spread into general applications use, which it wasn't designed for and is poorly suited for. Programs that would have been better written in Pascal or Lisp got written in C, often with disasterous results. Since many C programmers didn't know the other languages, they never knew the problems of applying C to general-purpose programming.
In fact, the 'worse is better' argument would hold that C caught on because it was inferior; since it required greater skill and effort to program in, programmers specializing in it got more, longer and better paying positions, increasing their marketability and eventually placing them in positions where they got to decide which language to use. Since they naturally chose C whenever possible, the demand for C programmers rose while the demand for other types of programmers fell.
By extension, one could argue that the eclipse of C by C++ in the 1990s was not because it reduced the amount of programming work required, but increased it; this certainly is in line with my experience with that language. Things that could be done in a handful of lines in Common Lisp sprawl for page after page in C++, yet which one is considered the more efficient language?
Mind you, a capable C++ programmer can write tight, concise code quickly; but such programmers are rare. It takes a lot more skill in C++ to code in than in say, Java. But becuase of this, the demand for C and C++ programmers remains high, so there is a pressure to learn those two languages.
</flame>
No I'm not bitter about this, why do you ask?
Re:When will C be replaced?
Actually, I disagree. No language ever truly dies, but it can come close. There will still be a few die hard fans:
Liberty Basic
Euphoria
Prolog
etc...
In fact, there are still programmers who insist on writing Windows based programs entirely in x86 Assembly:
Iczelion's Win32 Assembly Homepage
I used to be one of them...believe me when I say they are die hards. XD
Liberty Basic
Euphoria
Prolog
etc...
In fact, there are still programmers who insist on writing Windows based programs entirely in x86 Assembly:
Iczelion's Win32 Assembly Homepage
I used to be one of them...believe me when I say they are die hards. XD
Re:When will C be replaced?
I bet you saw this coming, no?
I don't want to kick off another Java-vs-C++ flamewar, but rather point out that every language has been designed with a certain goal in mind.
C was designed because Kernighan needed a language to code Unix in.
C++ was designed to introduce more powerful concepts - OO support, generic programming (templates), namespace partitioning, function and operator overloading - with as shallow a learning curve for C programmers as possible, and without sacrificing in performance and adaptability.
Java was designed to provide a cross-platform VM-executed language that's more secure than C++, but similar enough to provide a shallow learning curve.
In their way, all three succeeded.
The problem is that people keep comparing the three.
Back to the quote:
Java is a very good language if used for it's original goal: web and cross-platform applications. Since Java's "standard library" is actually part of the language, you can do lots of things with nothing more but the core language; the runtime requirements, though, are hideous.
C++, on the other hand, can be used to write very efficient code - even more so than C. (Believe it or not, C++ can e.g. sort complex data objects orders of magnitude faster than the best C algorithms.) The shame is that far too many C++ coders are former C or Java coders, and never cared to really learn the language. Since C++ is so versatile, it doesn't resist being "bent" into pseudo-C or pseudo-Java, which doesn't do the language justice.
Add to this the fact that C++ has been far too long without a standard ABI, hindering the distribution of binary C++ libraries, and you can see why C++ is often much underestimated.
That isn't to say that C++ is "a better language", just that it is a viable choice if you know it.
If you want to write an OS, use C or C++. If you want to write an application, use Java or C++. That alone should tell you something.
Bottom line, use a language you are comfortable with and that is suited for the task at hand. Some tools are ugly but efficient. Some tools are beautiful and efficient. Some are beautiful and useless. The ugly and useless don't make it into public awareness.
Hmmmm... I'd like to counter this with a definite "it depends". ;DSchol-R-LEA wrote: Mind you, a capable C++ programmer can write tight, concise code quickly; but such programmers are rare. It takes a lot more skill in C++ to code in than in say, Java.
I don't want to kick off another Java-vs-C++ flamewar, but rather point out that every language has been designed with a certain goal in mind.
C was designed because Kernighan needed a language to code Unix in.
C++ was designed to introduce more powerful concepts - OO support, generic programming (templates), namespace partitioning, function and operator overloading - with as shallow a learning curve for C programmers as possible, and without sacrificing in performance and adaptability.
Java was designed to provide a cross-platform VM-executed language that's more secure than C++, but similar enough to provide a shallow learning curve.
In their way, all three succeeded.
The problem is that people keep comparing the three.
Back to the quote:
C++ is the more versatile language. You can code procedural, object oriented, or generically without even "raping" the language. If determined, you can do almost everything in C++. This flexibility comes at a cost: complexity.Mind you, a capable C++ programmer can write tight, concise code quickly; but such programmers are rare. It takes a lot more skill in C++ to code in than in say, Java.
Java is a very good language if used for it's original goal: web and cross-platform applications. Since Java's "standard library" is actually part of the language, you can do lots of things with nothing more but the core language; the runtime requirements, though, are hideous.
C++, on the other hand, can be used to write very efficient code - even more so than C. (Believe it or not, C++ can e.g. sort complex data objects orders of magnitude faster than the best C algorithms.) The shame is that far too many C++ coders are former C or Java coders, and never cared to really learn the language. Since C++ is so versatile, it doesn't resist being "bent" into pseudo-C or pseudo-Java, which doesn't do the language justice.
Add to this the fact that C++ has been far too long without a standard ABI, hindering the distribution of binary C++ libraries, and you can see why C++ is often much underestimated.
That isn't to say that C++ is "a better language", just that it is a viable choice if you know it.
If you want to write an OS, use C or C++. If you want to write an application, use Java or C++. That alone should tell you something.
Bottom line, use a language you are comfortable with and that is suited for the task at hand. Some tools are ugly but efficient. Some tools are beautiful and efficient. Some are beautiful and useless. The ugly and useless don't make it into public awareness.
Every good solution is obvious once you've found it.