Hacker News new | ask | show | jobs
by p1necone 77 days ago
This feels like an overly negative comment. language specific minutiae is interesting to a lot of developers, and this kind of stuff is exactly what you'd ask if someone claimed to be an experienced C++ developer. You're not going to decide not to hire them based on them not knowing this specific thing, but if you ask them 5 different questions about specific behaviour/edge cases/whatever and they don't know any of them it's probably a bad sign.

(Although "this is bad practice, I've never done it, I didn't care to look up details" would be a perfectly fine answer to me if I was the interviewer)

3 comments

I am an experienced C++ developer, I know what happens in this particular case, but this type of minutiae are only interesting to the developers who have never had an actually hard problem to solve so it's a red flag to me as well. 10 years ago I would have thought differently but today I do not. High performance teams do not care about this stuff.
Damn. Just the new C++ syntax for this stuff makes it seem like a foreign language.

It’s no longer the C++ from 20 years ago.

Raising exceptions in a destructor sounds even more fun than a “return” statement inside a Python “finally” block of a method.

The footgun store will never go out of business!!!

It's as close as you can get to useless knowledge. It's like asking a pilot "exactly how will the aircraft break apart if you nose dive it at high speed into the ground?"
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 "what's the proper way to hold a chainsaw"
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