Hacker News new | ask | show | jobs
by xentronium 5601 days ago
I thought it was an old perl convention.

    do_something or die "Somebody set up us the bomb"
1 comments

What if that was an actual semantic transformation in the language? Naming something XorDie would execute the body of X in a context within which all errors are caught, and if any is found, the call returns NIL or similar?

Easily doable with handler-case, unwind-protect and reader macros, but ugly as sin.

We do the same thing with getX and setX; it would be interesting to see more "meaningful" function names in a language.