News for hackers. Stuff that matters.
Re:Linus Torvalds on C++ by gsg on Tuesday February 28, 2012 @05:45AM (#3642689)
Huh? That link claims "The STL will not work in kernel mode and cannot be used", which is not much of a surprise given the STL's use of exceptions and dynamic allocation.

In any case, kernel guys seem to prefer their data structures in intrusive style rather than the container style ubiquitous throughout the C++ standard library. (For an example, see the intrusive list and red-black tree implementations in the Linux kernel.) Intrusive structures allow for exactly the kind of low allocation, very memory friendly layout that kernel developers are looking for - no clever optimisations necessary.

C++ features like stronger type checking, more careful casts and RAII are a more compelling argument for the language.

Re:Linus Torvalds on C++ by njs12345 on Tuesday February 28, 2012 @09:43AM (#3643293)
Indeed, I've seen a talk from Bjarne recently where he said that by considering what is required to make RAII work in the presence of exceptions you can basically derive the entirety of C++..
Re:Linus Torvalds on C++ by cbsmith on Tuesday February 28, 2012 @06:05AM (#3642741)
Intrusive structures can be done in nice clean ways in C++. See policy based design.
Re:Linus Torvalds on C++ by gsg on Tuesday February 28, 2012 @07:20AM (#3642911)
Sure, I wasn't arguing against C++.