C++0x Finally Becomes a Standard 398
Samfer writes "On Friday August 12th 2011, the results for the final ISO ballot on C++0x came in, and the ISO C++ Standards Committee were unanimous in favor of approving the new C++0x (for now unofficially known as C++11) object-oriented programming language standard which is intended to replace the existing C++ standard. The new standard is to offer new and improved features such as lambda functions, concurrent programming functionality, direct data field initialization, and an improved standard library to name but a few."
Although I haven't heavily used C++ in years, it is nice to see a decade long effort finally come to fruition. Especially nice is the support for type inference which should save quite a few people from RSI and make refactoring code a bit less obnoxious.
Sadly, tragedy struck (Score:3, Insightful)
and WOOSH there goes my karma...
Re:nice, but still missing... (Score:0, Insightful)
What is it with lazy/shitty programmers and garbage collection?
If you can't be bothered/figure out how to free memory when you're done with it do the rest of us all a favor and stop programming.
Re:Clean cool crisp refreshing (Score:3, Insightful)
Correction:
2) Operator overloading: because
Matrix A, B, C, D;
A = A+B*C + A*D;
is so much more readable than
Matrix A, B, C, D;
A.equals(A.plus(B.mult(C)).plus(A.mult(D)));
.... oh wait, it is! This is why Java sucks and C++ rocks for scientific programming.
Re:nice, but still missing... (Score:4, Insightful)
You lazy, spoiled punks with your Java and C# garbage collection. Back in my day, we collected our OWN garbage. It was a miserable task, but we were ignorant and didn't know any better. AND WE LIKED IT!
Re:Clean cool crisp refreshing (Score:4, Insightful)
Encapsulation
Polymorphism
Productivity
To name a few....
Re:nice, but still missing... (Score:1, Insightful)
Actually, people did garbage collection themselves because the horrendous waste of resources to have a separate thread, that knows little to nothing about what you're using your resources for, trying to manage them is outright fucking stupid.
Then computers got fast enough that you could write entire applications in interpreted languages running inside of other programs that are bloated and slow (and buggy!) in and of themselves. At that point all of the "programmers" decided that it was okay to write shit code because an inefficient watcher thread could babysit their code without any serious impact to the system (unless god forbid it has an error and crashes).
I'm pretty sure that's what you meant, right?
Re:Clean cool crisp refreshing (Score:4, Insightful)
It took about 45 minutes to write and test (and I'm not a Ruby expert by any means) and it's less than 100 lines, compared with the 1000+ line C program. I call it a win for Ruby
Challenge accepted! I bet I could rewrite that program in less than ten lines of Perl code. Any takers?
Seriously now, I've tried nearly every language I can put my hands on. I still use C when the going gets tough. One of the reasons is that C is not likely to change.
I've done a lot of small systems in Python lately and, yes, for a small system I can get it going faster than in C. HOWEVER, now comes Python 3. They tell me now that I should have used "from future import division". Apparently I'm too stupid to read the proper documentation, it was clearly stated in PEP 947, or something like that, that the behavior of the division operator would change. It seems that I should read carefully every single one of those thousands of PEPs to make sure they won't pull the rug from under my feet.
If I ever have to go through every division operation in a program to check which ones can stay as '/' and which ones have to be changed to '//' I will take the opportunity to rewrite that program in C, as, I can see it clearly now, I should have done from the start.
Re:Sadly, tragedy struck (Score:5, Insightful)
Smaller and simpler seem to be a better way to go.
Nobody is stopping anyone from using plain old C, if that's what they want.
Of course, many people just end up re-inventing portions of C++ when they do that.