   Question about STL naming style
  Ok, I use visual studio 2008 express edition for C++. And if you use it, thenyou will know about its intellisense. Specifically, say you do something like this: string str(as soon as you start that open parenthesis, the intellisense starts workingand showing the prototype of the overloaded constructor in the string class.The thing that annoys me is that when looking at the constructor, and I'm tryingto figure out which one I need to use, I get annoyed of it, because its hard totell which ctor does what, because the stl's ctor is not clear. They have all ofthese typedefs and stuff, that makes the ctor prototype unreadable. So like mosttimes, I end up googling the the string to look at its ctor in a normal language.As a specific example, the string class has a constructor that given acharacter X, and a number, Y, it initializes the string to Y amount of X.The more understandable constructor for this should be this : string ( size_t n, char c ); but in the intellisense their are up to 14 different constructor, each withits own weird syntax and typedefs. Sorry for babbling. Its just that itsannoying how stl's naming convention is. If they are going to usesomething like this : basic_string(const _Elem* Ptr, typename basic_string<_Elem,_Trait,_Ax>::size_type _Count>as their constructor, then why not typedef some of its parameter to make it a more readable prototype? Is it just me, or is anyone also annoyed by this.   
  They probably are typedefed, but the way parsing works, they get lost in translation.Quote:up to 14 different constructorJust memorize them.STL is mostly consistent, so just remembering the base approach means the rest is easy to guess.It's similar to how C standard functions work, such as destination being listed before source, which means that seeing (char *, char *) is self explanatory.Quote:The more understandable constructor for this should be this Perhaps, but it would be invalid. I don't recall the details, but container::size_type could probably be different from size_t.It's just C++, in all its glory.   ;  >>Perhaps, but it would be invalid. I don't recall the details, but container::size_type could probably be different from size_t.I got the translation from this website : http://www.cplusplus.com/reference/string/string/string/Anyways, I guess I'll have to live with it. I'll just memorize them. Thanksfor the response.   ;Quote:Original post by Concentrate>>Perhaps, but it would be invalid. I don't recall the details, but container::size_type could probably be different from size_t.I got the translation from this website : http://www.cplusplus.com/reference/string/string/string/And SGI's version is different.Verbosity of templates has long been a major gripe. These days, the answer to such problems is almost without exception - use a saner language.;  I got to agree that I was afraid of STL at first when I learned C++ exactly for that reason. In Visual Studio 6, STL errors messages were even worse. Of course, once you get used to using it it get pretty straightforward, but I admit that I still use MSDN or cplusplus.com once in a while.   ;Quote:Original post by AntheusThey probably are typedefed, but the way parsing works, they get lost in translation.Yeah, this seems like Intellisense's fault. The relevant constructor from the MSVC 2008 xstring header file is:basic_string(const _Elem *_Ptr, size_type _Count)Where size_type is a typedef. However, Intellisense likes substituting type definitions for typedef names.   