back

by ColinWright·15y ago·view on hn ↗
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.
1 comments
Brilliant. Thanks.