5 ms·
C++ culture at its worst -- listen to the weekly recommendations of Herb, Scott et al. and you'll be fine. Trust us.
by throwaway19182 10y ago
C++ culture at its worst -- listen to the weekly recommendations of Herb, Scott et al. and you'll be fine. Trust us.
- pjmlp 10y agoC++ culture at its best, fixing C memory corruption and UB errors inflicted into the industry, while providing an upgrade path for saner coding.
- throwaway30101 10y agoThanks, now we know why Windows has such a stellar security record. Really, talking to C++ proponents is like talking to a wall. C programmers can at least admit failures, grumble about their tools and have diverse opinions. Not so in C++. Religious adherence to dogma, unwaivering allegiance to conference heroes, unbridled enthusiasm for every new feature seems to be a prerequisite for programming in that language. And God forbid that there's any self-criticism, ever.
- pjmlp 10y agoC developers don't even care about security, as shown by making the C99 security annex, which was pretty small actually, optional in C11. Or they just like to wave the amount of CVE exploits that get added daily to the database, as not being a language issue.
- throwaway10190 10y agoThis is not my experience at all. I've often observed C programmers that were visibly embarrassed if a single segfault -- let alone an exploit -- was found in their code. I've observed C++ programmers who were completely indifferent to segfaults, shipped 5 more releases with the bug and continued instead discussing their latest abstractions and how awesome and secure C++ is. Also, for yet another time: The majority of CVE-worthy programs is written in C (for good reasons), why don't you look at Windows instead?
- pjmlp 10y ago> why don't you look at Windows instead? Because GNU/Linux is even worse nowadays, in spite of joking how Windows used to be, somehow they forgot to follow suit in terms of security. "Unsafe at any clock speed: Linux kernel security needs a rethink" http://arstechnica.com/security/2016/09/linux-kernel-security-needs-fixing/ http://arstechnica.com/security/2016/09/linux-kernel-securit...
- 1298312931 10y agoAnd downvoting just seconds after a critical comment shows that the thread is brigaded (yet again) by the stakeholders.
- shakna 10y agoIf C++ was that good at that, what need for Rust would we have? Both C and C++ face the problem that memory management is hard. In different places because they use different approaches to the same problems. Sometimes C is appropriate, sometimes C++, and sometimes Rust. There is no reason these languages can't coexist peacefully, and no reason we can't all learn from each other.
- pjmlp 10y agoBecause while C++ offers the language features for writing good code, it doesn't prevent that many use it as "C with C++ compiler". Which is both a path to its successful adoption as better C replaced, but also a curse to language improvements. So we need languages that share the same spirit as C++ in programmer tooling, but don't allow copy-paste of C code. Also because Ada compilers were too expensive and most younger generations of developers never heard of it. Hence Rust, which while a good progress towards safety still needs to match C++'s IDEs, debugging tools and being available on OS vendors SDKs as first level language. I am looking forward to it, but it still isn't quite there.
- shakna 10y agoC too offers language features for writing good code, but is also cursed by the power it gives the programmer. It's fantastic flow controls allowed us to move beyond ASM and its convoluted jumps that can become difficult to reason about. C++ gave us abstraction models that made reasoning about state easier in many ways, but spoils us by allowing us to try and abstract everything, and still possesses unexpected dangers. Rust gives us abstraction over memory addresses, protecting us from ourselves, but still giving us some power, but sometimes getting in the way of the programmer. There is a place for all of these. I like that my RTC uses ASM, I like that my watch uses C, I like that my word processor uses C++, and I like that my web server uses Rust. No one must be superior to the other. They aren't successors to each other. I think we find ourselves here: [0], and I think you and I may have to agree to disagree, because none of these languages is perfect, and they all impact each other. [0] https://news.ycombinator.com/item?id=13173723 https://news.ycombinator.com/item?id=13173723