Thomas Young's Blog
Creator of the PathEngine middleware library. Writes about programming (c++, python, pathfinding, game AI) at upcoder.com.
Another response to feedback to my post about rolling your own vector class. In this post I look at initialisation semantics once again, but in more detail. (This is an issue for some classes as well as built in types, but can be worked around.)
This post is essentially a response to feedback to
my previous post about using a custom vector class, including some comments by Herb Sutter.
STL vectors offer a great combination of dynamically resizing convenience and low level contiguous buffer accessing performance but std::vector is not the only option and custom implementations can sometimes be a better fit for specific requirements.
STL style vectors are convenient because they hide the details of internal buffer management, and present a simplified interface, but sometimes convenience can be a trap!
STL style vectors are a pretty useful construct.
I remember coming to C++ (and the STL) from a background in lower level programming, and finding STL vectors a bit surprising,
with the idea of amortized constant time complexity and so o
Thomas Young's Comments
[Blog - 12/23/2013 - 04:32]
Try searching for something like ...
Try searching for something like 'relocatable allocators '. We don 't do this currently, but it 's quite an interesting idea and maybe something I 'll come back to look at in a future post..
[Blog - 12/10/2013 - 01:31]
As a programmer with children, ...
As a programmer with children, the teaching programming to children side of this is quite interesting to me, specifically, but I find that teaching anything to children can be complicated since they have to be interested, for one thing . r n r nI read a blog post somewhere that ...