
|
C++ is considered one of the most used programming languages out there, it's very fast and, after all these years, mature. All of it's features are essentially a superset of every programming language that exists now days and this gives it almost limitless possibilities but at the same time it makes it very complex. From the last revision of C++ in 1999, new programming needs arose and for that reason a facelifting is imminent after 10 years hiatus. The new ISO standard has a temporary name "C++0x" and at the present time it's being finalized. According to Bjarne Stroustrup (creator of C++ and member of the committee) the compilers will include the new features in a year or more. GCC currently supports some of the C++0x features but not all of them. The new standard adds many new things in the language as well as the STL (C++ Standard Library). Some of my favorites are the following:
auto: Deduction of a type from an initializer. Example: auto x = an_int_vector.begin();
With in-class member initializers we can set default values to class members. Example: class A{ int x = 7; };. With auto we wont have to define the type all the time.
constexpr: Generalized and guaranteed constant expressions. For example this will be valid: const int i = std::numeric_limits::max(); Because the max() returns constexpr.
In unions we can now have (under some circumstances) classes with default constructor.
With delegating constructors we can initialize a constructor by using another constructor. We dont have to write "init" member functions for common initialization.
The changes in STL are far more useful. I'm looking forward for threading library, array container, atomic operations, regular expressions library and the rest of the goodies.
The question still remains. Will this features improve C++ and make our lives easier or they will make C++ more bloated and complex?
[Showing 0 to 0 of Total 0]
† Add Your Comment †
|