Hacker News new | ask | show | jobs
by mahmud 5595 days ago
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.

1 comments

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