C is a better language than any language you care to name.
-
OriginalGriff wrote:
If you want small tight code for embedded work, then assembler is probably a good bet - though C is very useful there, it does tend to generate bloated code compared to that produced by a good assembler programmer. The C code will be produced faster, but it'll need more RAM, more processor, more...in embedded work you don't always have the luxury!
This depends a lot on the Compiler and IDE used. While it is still true for a lot of Compilers, nowadays there are Compilers out there which make C code as efficient as Assembler code (at really high licence cost, of course - You are probably still cheaper off with Assemble).
I will never again mention that Dalek Dave was the poster of the One Millionth Lounge Post, nor that it was complete drivel.
The console is a black place [taken from Q&A]
How to ask a questionI agree that compilers do produce good code: but they can't interpret what the author is trying to get the hardware to do and that means what they generate can be spectacularly inefficient. I had this problem with the ARM development kit (which was stupid money) - I needed to generate a specific wave output with my data to match the hardware it was interfacing to - and the C / Embedded C++ code just wouldn't do it no matter what I tried. In assembler it was trivial (but I eventually fitted a second PIC processor just to handle the interface - and coded that in C :laugh: )
Those who fail to learn history are doomed to repeat it. --- George Santayana (December 16, 1863 – September 26, 1952) Those who fail to clear history are doomed to explain it. --- OriginalGriff (February 24, 1959 – ∞)
-
It's a good language, but in the modern world it's a bit...outclassed. If you want small tight code for embedded work, then assembler is probably a good bet - though C is very useful there, it does tend to generate bloated code compared to that produced by a good assembler programmer. The C code will be produced faster, but it'll need more RAM, more processor, more...in embedded work you don't always have the luxury! If you want desktop work, then C# or C++ have so many massive advantages in terms of OOPs design that there really isn't any comparison. It'll take you a lot longer to write the same app in C, and it'll almost certainly be harder to maintain. If you want to write a website, then good luck doing it in C... It's a product of it's time: it was designed to be "better than COBOL and FORTRAN". But the world has moved on, and the "competition" is a lot more sophisticated now.
Those who fail to learn history are doomed to repeat it. --- George Santayana (December 16, 1863 – September 26, 1952) Those who fail to clear history are doomed to explain it. --- OriginalGriff (February 24, 1959 – ∞)
-
Discuss. I've just read The Unreasonable Effectiveness of C[^] and decided to outsource my ranting response to it
cheers Chris Maunder
Define "better". /ravi
My new year resolution: 2048 x 1536 Home | Articles | My .NET bits | Freeware ravib(at)ravib(dot)com
-
Jeremy Falcon wrote:
It's like just as soon as computers get faster, we want to make the languages more bloated.
...and it flows straight down to our operating systems and applications. IMHO - A fresh Windows 2K and Office 2K install is still the fastest, cleanest, most productive Microsoft office stack ever made.
Government is not reason; it is not eloquent; it is force. Like fire, it is a dangerous servant and a fearful master. ~ George Washington
...for about a week....:laugh:
Those who fail to learn history are doomed to repeat it. --- George Santayana (December 16, 1863 – September 26, 1952) Those who fail to clear history are doomed to explain it. --- OriginalGriff (February 24, 1959 – ∞)
-
Define "better". /ravi
My new year resolution: 2048 x 1536 Home | Articles | My .NET bits | Freeware ravib(at)ravib(dot)com
"Someone who gambles"
Those who fail to learn history are doomed to repeat it. --- George Santayana (December 16, 1863 – September 26, 1952) Those who fail to clear history are doomed to explain it. --- OriginalGriff (February 24, 1959 – ∞)
-
"Someone who gambles"
Those who fail to learn history are doomed to repeat it. --- George Santayana (December 16, 1863 – September 26, 1952) Those who fail to clear history are doomed to explain it. --- OriginalGriff (February 24, 1959 – ∞)
Isn't that "bettor"? /ravi
My new year resolution: 2048 x 1536 Home | Articles | My .NET bits | Freeware ravib(at)ravib(dot)com
-
C and AOL is there anything else?
Here today gone to Maui...
-
C++ is better.
-
Roger Wright wrote:
Then came C, and the death spiral of useful language development began.
It's like just as soon as computers get faster, we want to make the languages more bloated. That way we never enjoy the new speed, we simply keep things the same and have a new cool shiny layer that sounds technical to toss on top of it. I've never made a programming language, but when I think of something like Ruby, which has some nice features, and then I think it's slow as dirt so I'll never use it. Just because CPUs are faster doesn't mean we can waste cycles, otherwise it's always a game of catch up.
Jeremy Falcon
-
Define "better". /ravi
My new year resolution: 2048 x 1536 Home | Articles | My .NET bits | Freeware ravib(at)ravib(dot)com
-
Isn't that "bettor"? /ravi
My new year resolution: 2048 x 1536 Home | Articles | My .NET bits | Freeware ravib(at)ravib(dot)com
-
How about
iC
instead? Apple inspired :laugh: -
Discuss. I've just read The Unreasonable Effectiveness of C[^] and decided to outsource my ranting response to it
cheers Chris Maunder
-
Discuss. I've just read The Unreasonable Effectiveness of C[^] and decided to outsource my ranting response to it
cheers Chris Maunder
"The difference between genius and stupidity is that genius has its limits." - Albert Einstein
"As far as we know, our computer has never had an undetected error." - Weisert
"If you are searching for perfection in others, then you seek disappointment. If you are seek perfection in yourself, then you will find failure." - Balboos HaGadol Mar 2010
-
Define "better". /ravi
My new year resolution: 2048 x 1536 Home | Articles | My .NET bits | Freeware ravib(at)ravib(dot)com
Unfortunately, if you don't know it could never be explained to you.
"The difference between genius and stupidity is that genius has its limits." - Albert Einstein
"As far as we know, our computer has never had an undetected error." - Weisert
"If you are searching for perfection in others, then you seek disappointment. If you are seek perfection in yourself, then you will find failure." - Balboos HaGadol Mar 2010
-
You bet.
Government is not reason; it is not eloquent; it is force. Like fire, it is a dangerous servant and a fearful master. ~ George Washington
Look, a Who tribute band. You better bet your life...
-
D language[^] is better. It combines the simplicity of C and avoids all the kludginess of C++ for the same elegance you see in C#. Plus...no *.H files or #defines !!!! :) Plus garbage collection!
DaveX86 wrote:
Plus garbage collection!
As Is Well Understood and Universally Accepted: "You don't need garbage collection if your code is not garbage!"
"The difference between genius and stupidity is that genius has its limits." - Albert Einstein
"As far as we know, our computer has never had an undetected error." - Weisert
"If you are searching for perfection in others, then you seek disappointment. If you are seek perfection in yourself, then you will find failure." - Balboos HaGadol Mar 2010
-
That article is all wrong. The guy assumes that just because a feature exists you are forced to use it. Most expercienced c++ programers are only using a small subset of the language.
And even then, there are 4 sub-languages to C++: - C backward compatibility - C++ - STL - Template meta-programming How you use C++ primarily depends on which one of the sub-languages you are using for that portion of the program.
-
How about
iC
instead? Apple inspired :laugh: -
Look, a Who tribute band. You better bet your life...
Who's next? /ravi
My new year resolution: 2048 x 1536 Home | Articles | My .NET bits | Freeware ravib(at)ravib(dot)com