story
C++ is large and hard to master, but I don't think UB is the best reason to choose C over it.
I especially like the fact that you can specify which variables are captured by the closure: http://www.cprogramming.com/c++11/c++11-lambda-closures.html
I use both C++ and Scala on daily basis and there are just a few things I wish C++ had from Scala. On the other hand it is a huge time saver not having to worry about the JVM GC freeze.
OK but so what? It is also years ahead of BF.
C++11 has a few nice features, but it is really dragged down by low level issues. You talk about garbage collection like it is a problem, but C++ still does not even offer good garbage collection (not even optional garbage collection) for those situations where it makes sense. At least with Java you do not need to manually break cyclic references to prevent memory leaks.
As for closures, why would I want to specify which variables are captured? If I reference a variable from the enclosing environment, I capture it. If I mask the variable, I do not capture it. What point is there in explicitly declaring this? Frankly, the entire C++11 approach to closures is insane. Why add the extra syntax to explicitly declare how variables are captured, when capture by value covers all cases?
I stand by what I said. C++ is an awful language.
BTW, Normally you should avoid "new" and "delete", only very special use cases need it.
Specifying the closure variables is optional and it is both for performance and encapsulation. You can specify "nothing", "everything by reference", "everything with copy", just some by copy or reference - mix & match. If this is too much to start with then just copy everything with [=] and clean it up later if it turns out to be a bottleneck. The point is: you can save on cycles if you want to/have to.
If you think C++ is not a match for you, that's OK, there are plenty other languages. You don't need performance all the time - some are OK with 400 queries/sec, others want 7,000 on the same server: http://www.techempower.com/benchmarks/#section=data-r6&hw=i7...
Bad engineers blame their tools.
C#: http://conversations.nokia.com/2012/06/01/interview-with-mat...
Ruby: https://blog.twitter.com/2011/building-faster-ruby-garbage-c... (It was not good enough, they dumped Ruby)
Accepted answer? "Manual tracking of objects" http://stackoverflow.com/questions/2484079/how-can-i-avoid-g...
Google has 14 million web pages about Garbage Collector issues...
See section 9 http://www.joelonsoftware.com/articles/fog0000000043.html