|
Chris Maunder wrote: C is a better language than any language you care to name
No, I think I would much rather talk to someone using English.
|
|
|
|
|
printf("Why is that then?");
|
|
|
|
|
|
C is still my favorite language. Most likely always will be. Took me years to migrate to C++ because any decent C programmer knows you can apply some OOP concepts to C. That being said, I think C++ is a great language, not so much in syntax for the STL, but overall.
If I'm keen to write a game or something extremely computationally intensive, I'd choose C every time. So he's right on that point. I know you can write C in C++ blah blah blah, but when in Rome. Anyway, the biggest disadvantage C has is it's getting crusty. Not many modern libraries for it or additions to the language like some of the goodies C++ 11 got.
If I'm writing a web application, I'd still go with something like PHP over C simply because of the amount of pre-existing libraries out there for that purpose I wouldn't have to reinvent the wheel. Unless it was meant to serve millions of users, then I'd write it in C regardless, much like how parts of YouTube are.
Jeremy Falcon
|
|
|
|
|
|
And, dammit, that's good enough for him.
cheers
Chris Maunder
|
|
|
|
|
So C++ is for two cookies?
(cookie++ ; )
Microsoft ... the only place where VARIANT_TRUE != true
|
|
|
|
|
I watched programming languages evolve for years, becoming steadily more efficient, powerful, readable and maintainable up to the epitome, Turbo Pascal 5.5. Then came C, and the death spiral of useful language development began. The devolution continues...;P
Will Rogers never met me.
|
|
|
|
|
Roger Wright wrote: Then came C, and the death spiral of useful language development began.
Nah, BASIC came first by 5 years!
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 – ∞)
|
|
|
|
|
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
|
|
|
|
|
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....
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 – ∞)
|
|
|
|
|
Lua is not bloated, for instance.
Veni, vidi, vici.
|
|
|
|
|
Agree with you totally.
"Rock journalism is people who can't write interviewing people who can't talk for people who can't read." Frank Zappa 1980
|
|
|
|
|
Jeremy Falcon wrote: Just because CPUs are faster doesn't mean we can waste cycles, otherwise it's always a game of catch up.
True, only if you're doing something extremely CPU-bound. However, the vast majority of current application are highly user-interactive, where , by far, the really speed bottleneck is the user.
Truth,
James
|
|
|
|
|
Jeremy Falcon wrote: 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
The assembly guys said the same thing of C. I'd be willing to bet the patch-cable guys said the same thing of assembly.
Do you really want to program your current applications using patch cables? How about assembler? It isn't (or shouldn't) be about adding cool-sounding technical layers, each language evolution allows the computer to do more of the mechanical grunt work, freeing us to spend more time doing the creative part. I don't know about you, but I really appreciate that.
We can program with only 1's, but if all you've got are zeros, you've got nothing.
|
|
|
|
|
patbob wrote: It isn't (or shouldn't) be about adding cool-sounding technical layers, each language evolution allows the computer to do more of the mechanical grunt work, freeing us to spend more time doing the creative part. I don't know about you, but I really appreciate that.
I totally agree with this, but only if the evolution gives us a real gain. Something like sugar coating at the price of performance I don't agree with. A legitimate paradigm shift I could understand.
Jeremy Falcon
|
|
|
|
|
Jeremy Falcon wrote: sugar coating at the price of performance I don't agree with Often, what has appeared to me at first as a sugar coating, turns out to be a paradigm shift in thinking that I didn't grasp. Not always, but a lot of times.
We can program with only 1's, but if all you've got are zeros, you've got nothing.
|
|
|
|
|
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 – ∞)
|
|
|
|
|
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 question
|
|
|
|
|
I 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 )
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 – ∞)
|
|
|
|
|
OriginalGriff wrote: 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 agree, I love programming in Assembly, but I'm not sure I would beat the compiler, I'm just an enthusiast, don't program in it professionally. I also love C/C++ and was wondering if the ARM compiler you used support mixing up C and Assembly, like:
__asm
{
INC [EAX]
MOV EBX, [EAX]
...
}
To alcohol! The cause of, and solution to, all of life's problems - Homer Simpson
----
Our heads are round so our thoughts can change direction - Francis Picabia
|
|
|
|
|
|
Awesome, thanks
To alcohol! The cause of, and solution to, all of life's problems - Homer Simpson
----
Our heads are round so our thoughts can change direction - Francis Picabia
|
|
|
|
|
Right tool for the right job.
Not a lot of people use assembler in embedded work mostly C and a lot of them just because they've used it for so long it has become the language of choice.
As embedded hardware evolves and memory and speed less of a problem higher level languages will eventually replace C.
Here today gone to Maui...
|
|
|
|
|