Unuse of STL

70 views
Skip to first unread message

lordblackfox

unread,
Aug 14, 2012, 3:34:14 PM8/14/12
to fog...@googlegroups.com
I've read that you don't use the STL containers, and prefer implement your owns. Why?

Petr Kobalíček

unread,
Aug 16, 2012, 1:45:41 PM8/16/12
to fog...@googlegroups.com
Hi,

there are several reasons why new containers were designed:

1. Fog doesn't use rtti and c++ exceptions so the code can't use STL in general.
2. Fog internally knows the implementation so it's not possible to
fail in certain places (like making a weak-copy of string, list, hash,
and other containers).
3. Fog supports Var (variant type concept) which is binary compatible
to these containers, it's not possible to keep this design when using
stl or any other collection implementation.
4. Fog is able to optimize/extend some specific containers, including
strings, hash tables, etc... This means that for example Hash<String,
...> implementation contains methods which accept also raw char arrays
instead of only String as a key.

I hope that the explanation is fine;)

Best regards
Petr
Reply all
Reply to author
Forward
0 new messages