<instructions>Your goal is to analyze the following comment and estimate how highly it will be upvoted by the Hacker News community.</instructions><comment><author>naertcxx</author><text>I think the focus on smart pointers is a huge mistake. Code bases using shared_ptr inevitably will have cycles and memory leaks, and no one understands the graphs any more.&lt;p&gt;Tree algorithms that are simple in literature get bloated and slow with shared_ptr.&lt;p&gt;The only issue with pointers in C++, &lt;i&gt;which C does not have&lt;/i&gt;, is that so many things are copied around by default if one is using classes. So the way to deal with tree algorithms is to have a hidden tree with pointers and a class that wraps the tree and deletes all dangerous copy methods, implicit and explicit.&lt;p&gt;stdlib++ seems to use that approach as well.</text><parent_chain><item><author>qalmakka</author><text>While I love this paper and this proposal in general, as a C++ developer every time C++ adds a new major feature I get somewhat worried about two things:&lt;p&gt;1. how immense the language has become, and how hard it got to learn and implement&lt;p&gt;2. how &amp;quot;modernising&amp;quot; C++ gives developers less incentives to convince management to switch to safer languages&lt;p&gt;While I like C++ and how crazy powerful it is, I also must admit decades of using it that teaching it to new developers has become immensely hard in the last few years, and the &amp;quot;easier&amp;quot; inevitably ends up being the unsafe one (what else can you do when the language itself tells you to refrain from using `new`?).</text></item></parent_chain></comment><story><title>Reflection for C++26</title><url>https://isocpp.org/files/papers/P2996R4.html</url></story>
<instructions>Your goal is to analyze the following comment and estimate how highly it will be upvoted by the Hacker News community.</instructions><comment><author>fragmede</author><text>Yeah that&amp;#x27;s because you&amp;#x27;re not supposed to be using &amp;quot;new&amp;quot; anymore since the introduction of smart pointers in
C++11. Std::shared_ptr and std::unique_ptr are preferred. Shared pointers ref count and auto-delete, and unique pointers can&amp;#x27;t be copied.</text><parent_chain><item><author>qalmakka</author><text>While I love this paper and this proposal in general, as a C++ developer every time C++ adds a new major feature I get somewhat worried about two things:&lt;p&gt;1. how immense the language has become, and how hard it got to learn and implement&lt;p&gt;2. how &amp;quot;modernising&amp;quot; C++ gives developers less incentives to convince management to switch to safer languages&lt;p&gt;While I like C++ and how crazy powerful it is, I also must admit decades of using it that teaching it to new developers has become immensely hard in the last few years, and the &amp;quot;easier&amp;quot; inevitably ends up being the unsafe one (what else can you do when the language itself tells you to refrain from using `new`?).</text></item></parent_chain></comment><story><title>Reflection for C++26</title><url>https://isocpp.org/files/papers/P2996R4.html</url></story>