5 ms·
Even if you dislike C++, or like me, came to loathe it, I highly recommend the book he published in the same year, The Design and Evolution of C++ (https://www.
by hga 10y ago
Even if you dislike C++, or like me, came to loathe it, I highly recommend the book he published in the same year, The Design and Evolution of C++ (https://www.amazon.com/Design-Evolution-C-Bjarne-Stroustrup/dp/0201543303 https://www.amazon.com/Design-Evolution-C-Bjarne-Stroustrup/...). It's very educational about you go about making a successful language in an existing ecosystem, and even after swearing off the language I don't regret one bit the time I spent reading the book.
- lallysingh 10y agoIt's a solid book, but I wish there was something newer. It's 20 years old now!
- npiazza83 10y agoIf America were a year it would be out for all of December.
- profeta 10y agohow can you loathe C++ without caming to loathe it? i mean, everyone is bound to hate it, but you have to try it first to be sure...
- armitron 10y agoHow can you loathe Krokodil without coming to loathe it? You have to try it first to be sure...
- mlvljr 10y agoRussky drug addicts on HN? :V
- clappski 10y ago... I like it ...
- hga 10y agoI think it's flaws, only somewhat addressed in recent revisions, are better known now than they were in the mid-'90s when I learned and started using it, plus the industry wide ... obsession? with OO and especially class based OO has subsided. So someone with good taste who reads and trusts what he reads of these details could, yeah, probably not legitimately loathe it, but at least decide without using it that it wasn't for him. I changed the initial use of loathe in this context to dislike, thanks for pointing that out.
- ArkyBeagle 10y agoJust don't assume loathing is linear...
- ArkyBeagle 10y agoThe sort of puppy-dog C++ style on Arduinos - a sort of pedomorphic variation on "'C' with classes", chock full of singletons and the inability of constructors to operate unless they're called in A Certain Place - pretty much works. What's less attractive is Dogmatic Bikeshedding C++ OO Fundamentalism.
- santaclaus 10y ago> What's less attractive is Dogmatic Bikeshedding C++ OO Fundamentalism. Is that a thing? I always saw more of that in the Java world than C++ -- Java's standard library is rife with the singleton factory decorator monstrosities that have come to be associated with OO, C++ and the standard library have always felt more generic-programy. Now egregious use of obscure template meta programming tricks because of perceived (vs measured) performance gains, I've seen some horrors there...
- pjmlp 10y agoWhen the design patterns book was written it was all about Smalltalk and C++. I guess you missed the boat on CORBA, COM and DCOM, fun days... J2EE architects were mostly former C++ architects that moved into Java land. Also UWP APIs are actually the second coming of COM as .NET was originally supposed to be.
- mlvljr 10y agoBehave yourself! How dare...
- TickleSteve 10y agoits actually the full gcc compiler on arduino.... not that they advertise that.
- ArkyBeagle 10y agoThey were pretty upfront about it being gcc/g++ - the "Arduino" part are the built-in things like Serial.
- byuu 10y agoAfter seeing P0145R3 on C++17 refinements to expression order guarantees (and many things like that before it) ... I think I've finally started to actively dislike C++ now as well, after nearly 20 years of using it daily. They had a golden opportunity to fix it, but even with C++17 and the expression "a(b(), c());", it is still left indeterminate whether b() or c() will be invoked first. Even between calls in the same program! So what if they have side effects? It might be a picosecond faster if the compiler can run c() first to push its argument onto the stack first! I'm all for the power for C and C++ to optimize to such efficient code, and not consume many resources. But we're a long ways from the PDP-11 days and processor frequencies measured in KHz, and compiler developers are living in some alternate reality where the only thing that matters are benchmarks, and they'll happily undermine the stability and security of our software by doing things like erasing that call to memset() that cleared your private key from memory; or remove that conditional expression entirely because it detected the possibility of an integer overflow, so that means it can do whatever it wants! ... even though the world has been twos-complement for decades now. Given the very real security concerns and exploits we keep seeing in code ... I don't believe that using languages full of undefined/unspecified behavior is the way to build stable and reliable systems. Nobody can keep track of the hundreds of UB cases in C/C++. We all do it, and then suddenly a new GCC comes out with a new benchmark optimization, and now our programs are misbehaving. I'm willing to pay a 5-10% penalty, and give up compatibility with the Motorola 68000 platform, to get well-defined and predictable behavior. Maybe you keep C/C++ for that gaming OS, or that Wall Street trading system. But on my server? I can spare the CPU cycles. And yet, everything is built on C/C++. Your OS? That Python interpreter? Your web browser's Javascript engine? The .NET runtime? All C/C++ under the hood. We're building on quicksand; when we need a solid foundation.
- netheril96 10y agoThe standards body move very slowly. More practical approach is to push compilers to add more options to define undefined behavior so that we have safety with the minor cost of performance. We already have -fwrapv, -ftrapv and -fno-strict-aliasing. We could ask for more and a general -fsafe flag.
- 10y ago
- krylon 10y agoI agree. I only spent very little time with C++, but that book was both highly interesting and very entertaining to read. Highly recommended!