Linked by MOS6510 on Thu 10th Jan 2013 23:25 UTC
Thread beginning with comment 548356
To view parent comment, click here.
To read all comments associated with this story, please click here.
To view parent comment, click here.
To read all comments associated with this story, please click here.
RE[2]: true, but some libraries...
by kwan_e on Fri 11th Jan 2013 11:51
in reply to "RE: true, but some libraries..."
One thing that's always confused me is the odd separation between the STL and language features. For example, why are Iterators an STL class rather than being a language construct, along with some syntactic sugar like a foreach statement?
One of the biggest reasons why C++ is the complicated language it is is due to the design principle they used that most of the heavy lifting be done in libraries.
The STL and TR/Boost libraries serve as a demonstration of C++ language features.
There's also the other principle of "you don't pay for what you don't use". Having library features as part of the language features could result in unwanted features being pulled into low level code. Having a separate library is a very strong signal that the inclusion of heavy weight stuff is intentional when it's in code.
RE[3]: true, but some libraries...
by Vanders on Fri 11th Jan 2013 16:12
in reply to "RE[2]: true, but some libraries..."
One of the biggest reasons why C++ is the complicated language it is is due to the design principle they used that most of the heavy lifting be done in libraries.
That explains my question regarding Iterators, but I still find the split rather odd and slightly arbitrary.
Of course my complaint is technically invalid since C++11 added syntactic sugar for foreach loops, so at least the syntax isn't as ugly now.
RE[3]: true, but some libraries...
by Carewolf on Sat 12th Jan 2013 15:42
in reply to "RE[2]: true, but some libraries..."





Member since:
2005-07-06
Vectors are nice (as are Lists) but those alone aren't good enough reasons to use C++.
One thing that's always confused me is the odd separation between the STL and language features. For example, why are Iterators an STL class rather than being a language construct, along with some syntactic sugar like a foreach statement?