7 ms·
Given that I am working professionally with C++ (meaning I earn money by writing code in this language) I find it remarkable, that I appreciate and actually thi
by W0lf 4y ago
Given that I am working professionally with C++ (meaning I earn money by writing code in this language) I find it remarkable, that I appreciate and actually think it’s a useful book for my daily work. 1300+ pages of detailed language features just to somewhat get by and feel sufficient competent that my code does what I intended to do.
Looking behind my back there is a shelf of another 30+ books full of C++ (Meyers, Sutter, Alexandrescu, Langr, Feathers, Stroustrup, Lakos etc) that I have read page to page. However, I am certain that any sufficient C++ developer can embarrass me by showing me a corner of this language I have never experienced before. It just never stops. The things I have to keep in mind while coding a solution for the actual problem at hand can be astounding.
But then, I really like coding in it as there are these rare cases when I’m coming up with an elegant and straight to the point solution. I think I have some kind of Stockholm love-hate relationship with this tool of choice.
- k0k0r0 4y agoNot a professional here - by my own standart at least - however I also program in C++ for a living (among other languages). Definitely Stockholm-Syndrom in my case. Was the first language in which I was forced to work on some larger codebase. Since then I can't take the complexity of any other object-oriented language serious. All of them are basically a subset of C++.
- andi999 4y agoHow relevant was Lakos book in your opinion?
- W0lf 4y agoAn opinionated thorough demonstration on how to write C++ at scale. I didn’t agree one all aspects, though I have to admit it was the first book on C++ that clearly stated _how_ to actually design stuff both on a physical as well as on a logical level. Something which most other books on C++ won’t get into. All that being said I think it was pretty relevant for medium to large codebases
- ncmncm 4y agoNot at all. It has exactly one obviously useful piece of advice: don't make circular dependencies between libraries. In practice, that means organizing in layers. Most of us don't depend on many libraries where the authors of the libraries know one another, so it is easy to follow, even by accident. It has lots and lots of obsolete advice, though.
- deleted 4y ago[deleted]
- bcrosby95 4y agoAlexandrescu's books are what caused me to "nope" out of C++ and jump ship to Java. And when my friend starting working at Google (in C++), I gave him my pile of books.
- ncmncm 4y agoC++ is not the language for everyone. But most of Alexandrescu's book is more for people showing off than for people doing useful work. And, much of it is obsolete, supplanted by straightforward core language features. Their usefulness was demonstrated by use in the wild of Alexandrescu's workarounds.
- gigatexal 4y agoAt what point does a C++ programmer like yourself just switch to something that advertises safety but also C like performance? At what point does it get so difficult to write robust, “safe” C++ that one switches languages? How necessary is all this safety, even? (Doh! Of course it’s necessary for hardening your software against bugs and making the overall ecosystem safer).
- snovv_crash 4y agoThe complexity of C++ lives primarily in the fact that it is almost entirely backwards compatible all the way back to the late 1980s, and mostly compatible all the way back to K&R C. Modern C++, when you stick to the new idioms (RAII, range loops, auto lambdas etc) is almost as compact and succinct as Python with type annotations. One of the biggest differences is readability is that the standard library is not "batteries included" so people roll a lot of stuff themselves.
- ncmncm 4y agoMuch of what can usefully be written in C++ cannot be expressed at all in other languages, Rust included. Thus, for serious users, switching would mean a big step down. Most of the powerful, unique features are there to help encapsulate semantics in libraries, enabling libraries to adapt automatically to circumstances of use without loss of performance. As a result, libraries in C++ can be more powerful and useful. The more a library is used, the more resources are available to optimize and test it, so libraries can become extremely robust.
- oncewas 4y ago
- staticassertion 4y agoUltimately, it doesn't really matter. People will continue to write C++ so we should continue to provide resources that encourage doing so as safely as possible.
- restalis 4y ago