What's the difference between "STL" and "C++ Standard Library"? -
someone brought this article attention claims (i'm paraphrasing) stl term misused refer entire c++ standard library instead of parts taken sgi stl.
(...) refers "stl", despite fact few people still use stl (which designed @ sgi).
parts of c++ standard library based on parts of stl, , these parts many people (including several authors , notoriously error-ridden cplusplus.com) still refer "the stl". however, inaccurate; indeed, c++ standard never mentions "stl", , there content differences between two.
(...) "stl" used refer bits of stdlib happen based on sgi stl. people think it's entire standard library. gets put on cvs. , misleading.
i hardly know c++'s history can't judge article's correctness. should refrain using term stl? or isolated opinion?
the "stl" was written alexander stepanov in days long before c++ standardised. c++ existed through 80s, call "c++" language standardised in iso/iec 14882:2014 (and earlier versions, such iso/iec 14882:2011).
the stl used library c++, giving programmers access containers, iterators , algorithms. when standardisation happened, language committee designed parts of c++ standard library (which part of language standard) very closely match stl.
over years, many people — including prominent book authors, , various websites — have continued refer c++ standard library "the stl", despite fact 2 entities separate , there differences. these differences more pronounced in upcoming new c++ standard, includes various features , alters classes.
the original stl called "an implementation of c++ standard template library" (rather backwards actual history!), in same way microsoft visual studio or gcc ships implementation of c++ standard library. "standard template library" , "standard library" not same thing.
the battle whether current standard library should called "the stl" in whole or in part, and/or whether matters it's called.
for "stl"
there school of thought says knows "stl" means standard library, knows "c++" iso-standardised language.
it includes believe it doesn't matter long parties understand being talked about.
it's term made more prevalent nature of beast, of makes heavy use of c++ feature known "templates".
for "c++ standard library" (or stdlib)
however, there school of thought — subscribe — says confusing. people learning c++ first time do not know distinction, , may not notice small language differences.
the author of article has numerous times encountered people believe entire c++ standard library is stl, including features never part of stl itself. vocal proponents of "the stl", in contrast, know mean , refuse believe not "gets it". clearly, term's usage not uniform.
in addition, there stl-like libraries in fact implementations of original stl, not c++ standard library. until recently, stlport 1 of them (and there, the confusion abounds!).
further, c++ standard not contain text "stl" anywhere, , people habitually employ phrases "the stl included in c++ standard library", plain incorrect.
it's belief continuing propagate usage of term in way lead misunderstanding going on forever. alas, may entirely counter-productive attempt change things, if it's supposed better. may stuck double-meanings forever.
conclusion
i appreciate post has been little biased: wrote article linked to. :) anyway, hope helps explain battle bit better.
update 13/04/2011
here three perfect examples of using "the stl" refer entire c++ standard library. continues baffle me many people swear blind nobody ever this, when it's plain see on daily basis.
Comments
Post a Comment