3 ms·
What does this return: try { return true; } finally { return false; } What Neil Fraser has to say about this is too good to leave out here:
by ColinWright 16y ago
What does this return:
try {
return true;
} finally {
return false;
}
What Neil Fraser has to say about this is too good to leave out here:
The result is consistent in Java, JavaScript and
Python. I wrote this snippet on a whiteboard here
at Google. For the next couple of weeks engineers
passing by would abruptly stop, transfixed by the
paradox. Nerd sniping. I now use it during hiring
interviews, if the candidate suffers a similar
breakdown, I know we've got a keeper.
- combiclickwise 16y agoBrilliant. Thanks.