Elysia is a very typical ideologue. Usually people grow out of this though. Hopefully he/she is just someone who is young. Otherwise, we're dealing with someone who doesn't learn as they age and will probably terrorize the board for a long, long time.
Seriously, they use it because to them, it's more beneficial.
Originally Posted by Mario F.
They don't need the raw speed, memory manipulation, raw speed, etc, of C/C++.
They need what C# offers - lots of functionality, lots of security, etc.
And no, I'm not wiser and more knowledgeable.
I agree Mario F :)
It's going to be pretty harsh if you get a job with say Microsoft and tell them to get rid of this C# crap, and use "powerful" C++ instead. You claim C++ is faster to develop than C (or can be), by that logic why wouldn't you choose C#!? Or some other managed language where many, many, many things are provided.
> Assembler is worst possible language possible. It should only be used when you absolutely have no other choice.
By that denomination, you shouldn't be using C or C++. Or if you had a choice, you wouldn't be compiling to assembly from C++? Straight to machine code eh? I'd love to see your compiler.
You CAN have memory leaks with smart pointers... and when you do they're usually 99x harder to find and debug. Because the "smart pointer" thinks it's smarter than you are. Stop bashing C for not having OO features and alike. Sure you like C++, but there is no need to bash C everytime someone mentions it.
> And in my very humble opinion, they should not, and people who does that are morons,
> unless they have a very, very, very good reason, and I cannot find one.
I do it. For learning, portability. It's also great for teaching, last time I checked CPUs were not object oriented. And I'm not cutting off the group of people that may want to use a library in a C or C++ application.
You seem to have an answer to everything... which is fantastic! I can't wait to see your name in the next "PC" magazine. "Boy revolutionizes the software development industry. No more C#, C, Assembly, etc. C++ the way of the future!"
Pfft. No one is listening.
I don't use/like C# because it's managed. And I have on at least one occasion stated why. The end.
It could be. But it's left to say on the particular case of said stock market exchange one of the biggest requirements is exactly near real-time execution, as is on most banks and financial institutions. So, your speed arguments doesn't fit either. Sorry.
Originally Posted by Elysia
while I'm not an advocate of C# or Java per se, it is no longer true that virtual machine based languages are inherently slow. Many advocates argue strongly that Java and C# are comparably fast to C++ (I'm not saying that exactly). There is very little down side to C# in reality.
See JIT compilation
Bottom line, choose your language based on personal preference, but don't talk down to me for my choices.
Yes, this is true, but it's still slower on startup and also still slower than C/C++, although not terribly slower, but I simply don't buy that.
Originally Posted by FillYourBrain
I don't want any cuddly, duddly things that tells me what I can do or can't, plus the fact that the stupid thing is compiled on-the-fly.
If there were lots of security checks in native code, for C++, then I would accept that, but...
C# reminds me of typical stupid or lazy VB programmers, which there are a lot of out there.
reminds you of something you don't like so it makes it bad? That's some great logic... I hope you don't vote.
Do you read?
I don't like it because of several reasons AND it reminds me of something.
I don't like it BECAUSE it reminds me.
I never learned how to read.
On your other point... slower. It's really not. Part of the benefit of garbage collection paradigm is that you have delayed memory release. When the meat of an algorithm is running and the hardware should most be utilized you aren't bogging down your program with dynamic memory issues.
This makes it faster than C++ on those occasions.
I don't buy garbage collection. I like the old smart pointer style.
then use C++! Good for you, you've made a choice! Your choice however is no more legit than others.
This is kind of like asking "which is the best Operating System" (though that always results in a huge flame war too!) It totally depends on the specific situation, but for an introductory course it's not a huge deal, people! You want to learn the concepts, feel comfortable with SOMETHING, etc...
For the record, I don't deny that everyone has a right to choose their own preference of a language to develop with for specific platforms.
However, it is a good idea, for newbies anyway, to try to learn a language targeted at a specific platform when developing for that platform.
Example, if a newbie wants to design computer software, it would be better to learn C++ or C# rather than C. By doing this, they get a handful of advantages because they would be familiar with a language that is aimed at a specific platform. It would avoid the whole I'm more fluent in X targeted at Y, but I'm developing for Z problem.
This is also one of the reasons I tend to drag C down under.
Of course it's subjective, but at least they will know a little of this and that and can decide for themselves.
What really makes GCed languages faster is allocation, not deallocation. With an unmanaged heap, allocating a block of memory means searching for a free block of sufficient size, splitting a piece off it, and updating the management data to reflect the new situation. All this has to be done under a mutex, of course.
Originally Posted by FillYourBrain
With a compacting garbage collector like .Net's, allocating is adding an integer to a pointer. Since GCs usually stop the world for the actual compacting, this can be done without a mutex, with a simple atomic CAS loop. Under normal circumstances, this is magnitudes faster; under heavy contention, it's even more extreme.
While a compacting GC may also be faster on release under some circumstances, this difference is far less extreme and doesn't apply in all circumstances. It most definitely doesn't apply to non-compacting, conservative garbage collectors like those you can get for C++ (e.g. Boehm).