The question becomes, "how much do we really need from STL"?
From personal experience, the most used classes are std::string, and std::vector. The next is probably std::map (although std::list is handy, but vector can do most of it). Keep in mind, Tcl gets by with just string and maps of strings to strings...
D uses a simple concept to add maps.
char[][char[]] strStrMap; // a map from string to string
int[int] intIntMap; // a map from int to int
char[][int] intStrMap; // a map from int to string
The usage is just like it looks:
strStrMap["hello"] = "world";
intintMap[6] = 4; // Craw Giant
intStrMap[0] = "trample";
No comments:
Post a Comment