News for hackers. Stuff that matters.
Re:Ask HN: What is the state of C++ vs. Rust? by Yoric on Wednesday October 19, 2016 @04:33PM (#12747437)
Out of curiosity, do you have (open-source) examples of C++ projects that do it right?

In my numerous-though-irregular years as a C++ programmers, I haven't seen any project producing code that's convincingly safe. I won't list all the pitfalls of C++ here, but, well, who doesn't have war stories of bugs-because-of-aliasing, bugs-because-of-const-doesn't-actually-mean-constant, bugs-because-pointer-is-still-being-used-after-its-mutex-has-been-released, bugs-because-collection-has-somehow-been-mutated-during-traversal, etc? I have reached the point where I feel I can't trust any non-trivial C++ code, so I gladly switched to Rust for all my new non-webdev projects.

But back to the question, I would be really happy to see convincingly safe C++ subsets in action. I certainly hope that this would improve my life as a C++ developer, at least for future projects. As a side question, I wonder how many C++ developers actually produce such code.

Re:Ask HN: What is the state of C++ vs. Rust? by blub on Thursday October 20, 2016 @06:20AM (#12751057)
Don't have a link to such a project, I didn't really look. I am seriously considering starting one though, perhaps it's necessary.
Re:Ask HN: What is the state of C++ vs. Rust? by Yoric on Thursday October 20, 2016 @02:23PM (#12754833)
I am genuinely interested.

Also, I just realized that doing this right might require dropping lots of legacy C++ code, more or less as would starting in Rust.