
On Behalf Of Martin Adrian
Why is
boost::super_string ss(s) ss.trim()
easier than
boost::trim(s)
Well, because boost::trim(s) isn't "object oriented". It's procedural and if I am looking up operations to do on a string via the string's documentation, I won't see an external function named trim. This makes it very difficult for people to find out what the available operations are. This is very different than basic or other procedural languages in that procedural languages make an effort to group related functions in their documentation whereas oo languages do not. For better or worse, C++ is documented as a OO language and not as a procedural language. Furthermore, if we were to say the strings should be manipulated via functions, then we need to yank methods out of the string class so that we don't have a multiple personality disorder going on. AFAICT, the current situation buys us nothing good and cause people to seek a more rational language. I use this language every day, but I have to say that there is a certain love/hate relationship with it. There is just so much you just have to *know* with no consistent way of finding it if you don't. Google is really your friend in many cases. Anyway, my point is that it is a huge documentation difference when it comes to being able to see what is available to be done to a string. I have seen a few attempts to treat string specially in the documentation and lump things together. However, this is generally inconsistent with all the other objects and for no better reason than C++ has a lame string class. Just my opinion and experience, joe

Greer, Joe wrote:
This is very different than basic or other procedural languages in that procedural languages make an effort to group related functions in their documentation whereas oo languages do not.
Those functions are perfectly grouped in string_algo, which is a very explicit name.
For better or worse, C++ is documented as a OO language and not as a procedural language.
C++ isn't a OO language. There isn't a C++ Standard Library official documentation, but from all the ones I have seen it's certainly not documented that way.
I use this language every day, but I have to say that there is a certain love/hate relationship with it. There is just so much you just have to *know* with no consistent way of finding it if you don't. Google is really your friend in many cases.
It just looks like you don't have the good references. Google will just give you uninteresting results. Anyway you can't expect to find info about the standard library and extensions in the same place.
Anyway, my point is that it is a huge documentation difference when it comes to being able to see what is available to be done to a string. I have seen a few attempts to treat string specially in the documentation and lump things together. However, this is generally inconsistent with all the other objects and for no better reason than C++ has a lame string class.
It's not very good, indeed, but I wouldn't call it lame.
participants (2)
-
Greer, Joe
-
loufoque