Your wheel doesnt fit my car ...

Every now and then I rememeber that I decided at some point not to use STL for WOF, and then I start to think about how 'unproffersional' that is and start hearing voices telling me to switch to STL.
In fact I think my 1st use of STL was in 2001, sitting in my office, searching for a library that would give me good strings/containers and the like. When i first found STL and started reading about it I was pretty impressed really...
but enough about history ...

there are countless forum discussions and threads discussing code reuse and 'reinventing the wheel'

from coders hanging anybody not using STL
to coders beinbg shocked that DOOM3 doesnt use STL
to longer ...     discussions

but today i decided to change a bit of code that handles string parsing, and instead of using plain old C sscanf and friends, to use the new gr8 genius C++ iostream while this is not 'exactly' STL but its related ...

anyway, i was happily recoding this 'evil' 'unprofessional' C style code, and scanning string using >> and all that fun stuff, its fun cause it also supports locales and much much more thing i dont know about (im not sure this is a good thing though)

but my dreams came to an end when after succesfully scanning floats, my code sudeenly refused to scan old simple integers.

and i m saying my code because of course its my code thats doing sthg wrong, and surely not 'std' so i spent 1 hour looking at all those very improbable causes in my code, until i gave up, and in an evil split second of unprofessional thinking, I typed this in google:
iostream problem reading int comma
which found nice matches, and after the usual journey in google I found:
link
link
link

and so on ...
all these troubles for reading an int? yes of course I could fix it, there are workarounds, there are other STL libraries to use, and regression tests to make sure they work.

but all i needed is to read an int, I think i had code to do this 10 years ago when i still had no internet and was a total noob and was proud of a function that converts strings to integers, and even floats! :P
sure std has locales and this is why this messes up, but maybe this is not how i want to use locales, i dont need a cannon to kill a fly, sure STL is tons of code that can do anything, but the things i need from STL i coded for WOF in a couple of days and worked reliably with no problems until today.
so I dont want to be switching STL libraries for my code to work, I dont want to have headaches every time somebody changes something somewhere, I dont want to work around libraries that theoretically are 'pieces of coding art' until u need to do something practical with them.

just found this:
STL Guru Interview

QUOTE:
In other words, I realized that a parallel reduction algorithm is associated with a semigroup structure type. That is the fundamental point: algorithms are defined on algebraic structures. It took me another couple of years to realize that you have to extend the notion of structure by adding complexity requirements to regular axioms. And than it took 15 years to make it work. (I am still not sure that I have been successful in getting the point across to anybody outside the small circle of my friends.) I believe that iterator theories are as central to Computer Science as theories of rings or Banach spaces are central to Mathematics. Every time I would look at an algorithm I would try to find a structure on which it is defined. So what I wanted to do was to describe algorithms generically. That's what I like to do. I can spend a month working on a well known algorithm trying to find its generic representation. So far, I have been singularly unsuccessful in explaining to people that this is an important activity. But, somehow, the result of the activity - STL - became quite successful.

I understand all this! honest! I DO have a BE in Computer and Communications Engineering, and its gr8, artistic! nice and kewl, takes it all to a new level! but there was sthg wrong with the implementation i just used reading an int ...
QUOTE:
Yes. STL is not object oriented. I think that object orientedness is almost as much of a hoax as Artificial Intelligence

yes it is, but the same goes for code reuse and over-engineered floating in their own heaven of pure theory libraries ...

I actually could write much much better comments about them, but im tired and i have better things to do like workgin on WOF.
One point I still want to make is the horrible naming convention of iostream: its really chaotic and unintuitive, but i guess iostream is allowed to do this, to do things u would be hanged for if u did urself. (pubimbue, snextc, sbumpc), maybe to support 8 bit operating systems, but this is really not my problem ... I wont expand on this either although I would like to.
so as a conclusion, i ll stick to my own wheels until the next time i have STL voices in my head.
and just for the record, i do use other libraries so its really not a 'i dont use anything i didnt write syndrome'

end of bla bla ...




Page :  1