This is a discussion on Why not add CUDA forum? within the General Discussions forums, part of the Community Boards category; Originally Posted by whiteflags Counting the STL (and I don't know why you would), that was literally the only thing ...
You really don't need those things in other languages I think.
Nevertheless, they are unique to C++...
And I wouldn't say "don't need." They are handy. Indeed, it would simplify a lot of code! Why do you think RAII constructs have been proposed for Java?
Heh, at least you had the STL. When I was taught to program with C++ a decade ago, my teacher never introduced me to the standard containers from the STL. And yeah, like you, I never heard of RAII.Originally Posted by whiteflags
Considering the teaching computer science, what I like about the C++ standard library is the stuff from <algorithm> and <numeric>, along with their complexity guarantees. Oh, and the standard containers too, but those are certainly quite common in programming languages as built-in constructs or part of standard libraries.
Deterministic destruction/resource release through RAII is no longer unique to C++, though RAII in the form that C++ uses is unique, methinks.* Considering programming in practice, I like RAII as it is also applicable to resources other than memory. Furthermore, because RAII is a tool for automated memory management in C++, it certainly is more prominent in C++ than in programming languages that default to the use of garbage collection.
* I'm thinking of C#'s using statement and Python's with statement which introduce new blocks of scope when RAII is to be used, either for correctness in the face of exceptions or because it is just required, compared to just creating the objects in C++. No big deal when the aim is for the RAII object to be destroyed at the end of a local scope (and prettier when you do want the object to be in a more local scope), but I imagine that this complicates matters if the aim is for deterministic destruction with the aid of smart pointers.