Quote:Original post by losethos
To some extent, libraries take the fun out of stuff. Instead of building a solution from simple principles you know, you spend your time learning the library.
I kind of feel the same way sometimes, but it depends on the situation. Do you really want to build EVERYTHING from scratch?
Say you are programming in straight C. Do you always re-implement the string functions from string.h? Knowing how to implement them is certainly educational, but why should you bother when you are working on something completely unrelated?
The same holds here. Knowing how to manage dynamic memory and index into multi-dimentional arrays is certainly important, but again, why would you want to bother with this every single time you need to do this?
Not to mention that no matter how well you know this stuff, it is very error-prone. There's no need to to low-level operations like these unless you have to.
In C it's harder to abstract this away, but in C++ it's not, and you already have a class that takes care of memory management for you - std::vector. Similarly, you can create a class that simplifies working with multi-dimentional arrays (although I think boost already has something like this).
And about learning the library - no matter how long it will take you, if it's something you'll use often (which is definitely the case for the C++ standard library), the time spent will be worth it as it will save you much more time in the future.