[fpc-pascal] Re: State of fcl-stl generics lib
Florian Klämpfl
florian at freepascal.org
Sun Jan 20 15:13:45 CET 2013
Am 20.01.2013 15:03, schrieb leledumbo:
>> Where does the C++ STL expose a tree? It might be used internally by a
> map or set but I'am not aware of any tree class in the C++ STL.
>
> No, no, I was saying this data structure is even missing from C++ stl.
For good reasons. As said before a tree is an implementation detail.
When having a fully implemented C++ STL one really seldomly needs an
explicit tree implementation. Of course, there are special cases which
are speed/memory sensitive which require to implement explicitly a tree
but in this case a generic tree is probably also the wrong choice
because it does not allow the hand crafted optimizations needed in such
cases.
> In
> the end, we often need to write again and again that depth first, breadth
> first, iterative deepening, and many other algorithms working on tree that
> works exactly the same in any context. Even the tree itself as a container
> without any traversal algorithm is quite helpful.
More information about the fpc-pascal
mailing list