3 ms·
Well, in my own code I would, but you would never get some file handling / parsing library into boost, or the standard, that did that. And then (another C++ iss
by CJefferson 9y ago
Well, in my own code I would, but you would never get some file handling / parsing library into boost, or the standard, that did that. And then (another C++ issue), installing libraries can be fiddly.
- fsloth 9y ago"but you would never get some file handling / parsing library into boost, or the standard, that did that." Why would anyone want to write code that would go into either of those? In the general sense, I mean. Good production code is simple and is implemented preferably verbosely and understandably than cleverly. Speaking of good software patterns, I'm not sure boost nor STL are great examples of good software architecture. Boost especially is very templatey-bloatey. The biggest merit of STL is that is exists. "installing libraries can be fiddly." Does anyone really need to do that? Install C++ specific libraries I mean. In 10+ years I've never developed C++ software that would not store all of it's dependencies part of the project hierarchy or sub-structure, except for the standard library. The worst part of C++ is that is has these warts that subtly guide developers into copying all sorts of patterns for their own sake because they are seen "as the standard way to do it". Object orientation and templates should not be considered the basic building blocks of the archictecture of a C++ program, but rather escape valves when some usage pattern would end up more complex without them. For example, when someone spends long production time creating an elegant template based solution for whatever, generally it is an indication that something is wrong somewhere. There are of course exceptions to this rule, but just saving some boilerplate is never a good reason to do it.
- nly 9y ago> The biggest merit of STL is that is exists. The STL is a library of common algorithms and data structures that are decoupled from one another, and the complexity of operations in the STL has been enshrined in to the C++ standard. These two achievements alone warrant granting it huge respect. Imho, it's the essence of great design and it should be the very first thing taught to programmers new to C++. > copying all sorts of patterns for their own sake because they are seen "as the standard way to do it". Yeah, Python programmers would never do anything like that. If they did they might all run around calling it being 'Pythonic' or something. > Object orientation and templates should not be considered the basic building blocks of the archictecture of a C++ program Just tools in the toolbox, and the amount of mileage you can get out of just these two features, along with other staples like RAII and function overloading is pretty astounding.