> Then put yourself in the chair and assume it was a choice between C and C++. Which would you choose in this case?
Depends on what sort of software is to be written :P
> Then put yourself in the chair and assume it was a choice between C and C++. Which would you choose in this case?
Depends on what sort of software is to be written :P
Like others (and you) have said, it's not as clear-cut as that. It depends on the availability of skill as well as the type of program, as well as it's expected implementation. C and C++ and C# are all suited for a wide range of programming issues, but it doesn't mean that one is always best for a particular problem, or that you even have to use only one.
Well, if I ran that company, being the head programmer or something, I would recruit people for C# or C++, but definitely not C, seeing as developing with C++ would be faster than C with less bugs using known implementations.
Which was kindof my point. When developing computer software, expectations are often high, and C does not too well in that regard because of its age and lack of modern features expected from modern languages.
But I digress... all that really matters is that the job gets done. But for me, preferably not C. Just the type I am.
Oh well, carry on.
Yes, personal preference can definitely matter. Personal preference, you could say, is how comfortable you feel with the language, and therefore you might be able to program more effectively with it.
However, don't mistake age for lacking capability. Likewise, don't mistake lacking modern features as necessarily limiting.
C has a wide range of tools and methods to help with producing quality code because of it's age. Memory leak detectors, static analysis tools, code standards, well-known techniques and idioms even in specialized fields, etc.
Also, some people prefer not to use modern features such as exceptions. Either it's not their style, or they're not comfortable with them, or perhaps their coding standards say not to use exceptions because they are more difficult to verify in a code review than conventional return-based code.
I am starting my bachelor in engineering (not software engineering) this year, and there is a mandatory programming course "Introduction to Computation in Engineering Design", and it is in C. We only cover the very basics, though - branching, looping, modularization, and the last unit is on arrays (no pointers except if you consider using arrays and scanf as such, and no dynamic memory). That takes about 2 months (3 hrs/week). And then we will be into things like software/hardware interfacing (reading from switches and writing to LEDs I heard), and "data acquisition" (no idea what that means =P).
As for why C over C++, I don't know. We certainly don't need anything from C++ that's not in C, though.
I heard in CS they are using Java and C++ in the first year.
> I heard in CS they are using Java and C++ in the first year.
Same at my Uni. The CS/SE students don't touch C until 3rd year (They teach Java to CS, SE, and actually all IT degrees in first year). However 1st year engineering students don't get to play with it :'(
Last edited by zacs7; 10-11-2008 at 07:52 AM.
So if my name were Salem and I wanted to do the world a favor, I would sure be closing this thread about now.
Meh. It is kinda fun watching Elysia make a complete fool of him/herself
I gotta say though, it's kindof nice to finish one of these kinds of threads without it getting shut down.
> I gotta say though, it's kindof nice to finish one of these kinds of threads without it getting shut down.
Your face! ... Ohh shutdown!
Ooh, snap!
It seems that didn't work... oh well the mods must really want this to stay open
Godwin's law is starting to work against us... I will just bide my time. Oh and for the record, I am not a C# fan either, Elysia. So don't let these folks try to convince you that it is God's gift to software. However, I still use it...
C# is like wearing pants. Sure its inconvenient to put them on to go to the store. But the rules of society dictate that if I don't, I will get myself a Rodney King style beat down.
WARNING! Reading the mindless analogy above will likely cause perminant brain damage! It is not only circular logic, but it isn't even logical. Thus it is circular non-logic.
You know who else didn't like C? Nazis.
Yeah Godwin's law is fulfilled!
*slaps himself HARDLY for reading all the posts*
I ll post because I was bored and read everything and want to feel better for not wasting completely my time (so I will waste more).
I have to say that I actually see Elysia's point. I will more describe be as the "fun of programming". C++ in a way offers everything that C offers plus some new stuff. Like classes, exception handling. It makes the "game" more fun. Java and C# are really OOP. No fun. Because the fun is creating algorithms, not managing code.
On the other hand, C++ is somehow incomplete. If you want OOP features you are really better with C#. If you don't want them you are fine with C. If you want something in between, then mostly likely you just like to code.