4 comments

  • avalys1 hour ago
    Don’t know who this guy is, but I’m glad I never interviewed with him. This is language-version-specific behavioral minutiae that anyone can look up in 5 minutes in the rare case it matters, and is otherwise irrelevant to engineering software at a senior level.<p>This article is a junior engineer’s idea of what a senior engineer should know.
    • p1necone1 hour ago
      This feels like an overly negative comment. language specific minutiae is <i>interesting</i> to a lot of developers, and this kind of stuff is exactly what you&#x27;d ask if someone claimed to be an experienced C++ developer. You&#x27;re not going to decide not to hire them based on them not knowing <i>this specific thing</i>, but if you ask them 5 different questions about specific behaviour&#x2F;edge cases&#x2F;whatever and they don&#x27;t know <i>any</i> of them it&#x27;s probably a bad sign.<p>(Although &quot;this is bad practice, I&#x27;ve never done it, I didn&#x27;t care to look up details&quot; would be a perfectly fine answer to me if I was the interviewer)
      • zarzavat1 hour ago
        It&#x27;s as close as you can get to useless knowledge. It&#x27;s like asking a pilot &quot;exactly how will the aircraft break apart if you nose dive it at high speed into the ground?&quot;
        • throwaway274481 hour ago
          This analogy makes a lot of sense until you need to deal with an exception emanating from a destructor... then it looks a lot more like &quot;what&#x27;s the proper way to hold a chainsaw&quot;
          • foltik16 minutes ago
            I want to play a game. In your hands is a chainsaw about to be destructed. Another exception is already in flight. Live, or std::terminate. Make your choice. -Jigsaw
      • BobbyTables21 hour ago
        Damn. Just the new C++ syntax for this stuff makes it seem like a foreign language.<p>It’s no longer the C++ from 20 years ago.<p>Raising exceptions in a destructor sounds even more fun than a “return” statement inside a Python “finally” block of a method.<p>The footgun store will never go out of business!!!
    • rhoopr1 hour ago
      “The camera is the least important element in photography.”
    • nvch1 hour ago
      Well, now those who will go to look it up in 5 minutes may end up reading this guy’s article.
    • bsder1 hour ago
      &gt; This is language-version-specific behavioral minutiae that anyone can look up in 5 minutes in the rare case it matters, and is otherwise irrelevant to engineering software at a senior level.<p>The fact that C++ programming books have entire sections about destructors (see: Effective C++) shows that this is very much not irrelevant minutiae. C++ forces you to deal with this kind of detail all the time.<p>Now, we can have a much more interesting discussion about whether C++ is a disaster of a language precisely <i>because</i> you are forced to deal with this kind of minutiae by hand. We could also have an interesting discussion about whether RAII is the &quot;object oriented&quot; of our time. We could even have an interesting discussion as to why so many companies ban constructors&#x2F;destructors in their C++ programming guidelines.<p>However, irrelevant minutiae C++ destructors are not.
      • dotancohen30 minutes ago
        Ban constructors? Though I don&#x27;t agree with the practice, I could imagine a reason for banning destructors. But constructors? Why?
  • NooneAtAll32 hours ago
    I... I did not expect that noexcept(false) works on destructors
  • zarzavat1 hour ago
    There&#x27;s nothing essential to know about what happens when a destructor throws other than it&#x27;s bad and don&#x27;t do it. Especially if the effect is to terminate.<p>I hate this style of interviewing which is more about the interviewer feeling good about themselves rather than doing their job and assessing candidates. Just wastes everyone&#x27;s time all around.
  • supliminal2 hours ago
    No mention of vtables or thunks? We decided to proceed with another candidate.