Eh well, didn't mean it that way.
In case it sounds rude to anyone, then I apologize and remove the offending word.
>Did I miss something?
So it seems.
>Did someone mention something C can do that C++ cannot?
No, and nobody claimed that C++ can't do anything C can. Though that didn't stop you from making an arrogant and insulting comment about it. Whether you intended it or not, I read "No one seems to understand" as "Everyone is too dense to figure it out, even after I explain it".
[edit]
Bah, I'm too slow.
[/edit]
My best code is written with the delete key.
>I apologize! Please don't hate me
I don't hate anyone online. But since you didn't mean it, I can accept that it was just poor wording. No worries.
My best code is written with the delete key.
Ultimately, from a machiavelian point of view, I rather pleased that they teach java first. It makes it so much easier to find work for those of us that have been programming since before java was even thunk up.
A couple of questions came to mind while i was reading it:
1)how do you determine runtime cost?
2)how do you determine what some function will eventually execute?
also, I believe it is completely true: it's very difficult for me to program in C because my first language was Java. Building functions and algorithms are rather difficult for me because of how Java uses them. I continually pull from that experience of Java programming to write C code and clearly it hasn't helped me.
If it is so, why a lot of people wanting to buy a source code prefer C over C++?
And regard the mentioned earlier - only in the small project the programmer chooses the langugage. In real environment - the decision is made by management. It may or may not depend on the programmers preferences. But still the last word is from the project manager. So if he chooses langugage the programmer does not like - there are 2 choices - stick with it or leave.
All problems in computer science can be solved by another level of indirection,
except for the problem of too many layers of indirection.
– David J. Wheeler
C source is considerably easier to audit, because there's less going on behind the scenes. No hidden function calls. No surprising return paths through exceptions.
Again, this could be solved by defining subsets of C++ that don't have this stuff. But the truth is, we already have this subset: C.
All the buzzt!
CornedBee
"There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
- Flon's Law
I havent had this problem. My boss (the CEO) generally prefers C/C++. If I were to use some other language I dont think he would even notice or care if he did. As long as the project compiles and runs as expected he is happy.
I would be very very leary of any job that required me to impliment a solution in some particular language other than C/C++ without an extremely good reason.
That's what I'm trying to figure out myself! I don't see why they'd want an older, less powerful language (as I see it, C is less powerful than C since C++ could do everything C can and more).
But you miss out on powerful functionality. That's my thought on the matter. And C code generally looks messier than C++ code since C++ can use classes, so I don't agree.
I wouldent say C is less powerful; its lower level. C++ has features that make it easier to do stuff, but many come with overheads and its still very easy for someone hideous mess with it.That's what I'm trying to figure out myself! I don't see why they'd want an older, less powerful language (as I see it, C is less powerful than C since C++ could do everything C can and more).
Another option would be to use a higher level language like Java or C# for most stuff, and make a C dll to deal with the intensive bits.
Who is buying it? That's an important question to ask because who wants the C code, and why? The answers factor into the decision to buy.
Of course you don't. While I agree that Cornedbee could have cited something in particular (perhaps a code example from somewhere), that's just a completely subjective argument.Originally Posted by Elysia
Maybe. It may just be may opinion, though, but generally when I see C code, I see it as messy whereas C++ code would be much better looking. It may just be me, but I like the idea of classes, virtual functions and polymorphism. I use it in almost every program and design.
Hmm, well it could be just a big misunderstanding on your part. It sounds like, according to you, because of the syntax alone C loses some merit. There are efforts made by most well-versed C programmers t break up their projects into tasks and make the language expressive. Perhaps more hobbyists simply haven't made the effort.
And there are reasons to like C++. I love making classes and algorithms more flexible with templates if I've written something that works well. It's easier for me to do that in C++.
But it seems that because C dedicates itself to one paradigm, like Java's object oriented approaches to everything, it will be criticized for limiting the programmer's options to procedural solutions. Which is just nonsense: it's all because OOP is popular right now. Python, I think, recently added lambda expressions to the language, but that doesn't mean that some Pythonic functional programming is going to make functional languages obsolete. There need to be languages dedicated to certain paradigms because on occassion they do work better than a one-size-fits-all howitzer.