Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » Extra libraries, Code snippets, applications etc. » C++ language problems and code snippets » I don't get some aspects of STL ... [pointless rant]
Re: I don't get some aspects of STL ... [pointless rant] [message #21283 is a reply to message #20441] Mon, 11 May 2009 16:28 Go to previous message
piotr5 is currently offline  piotr5
Messages: 107
Registered: November 2005
Experienced Member
I see stl less as a library than as a standard. usually the containers of stl are absolutely useless for me and I need to write my own. the way I do this is to just copy some container from the header-files of stl and modify it along my own wishes. for example a graph-container could be created by reusing the list-container code. another interesting aspect of stl is that quite useless algorithms are implemented in stl on a template-basis -- if you know a better implementation for some particular case you can always write it as a specialization, people will understand your code because you used exactly the same function-name as in stl. finally the strange choice to return the end-iterator after whatever operation is also an example for setting up a standard: there are oftentimes cases with 2 or more possibilities for an interface, stl does tell us which to chose such that other people reading the sources wont be confused. but I agree, as a library stl certainly is just the last ressort when nothing else exists...

Smile
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: Multiple statements in for loop
Next Topic: overloading operators rules
Goto Forum:
  


Current Time: Mon Apr 29 14:45:48 CEST 2024

Total time taken to generate the page: 0.03699 seconds