3 ms·
I built cl-async and a lot of its satellite libraries completely ignoring restarts and the CL error handling paradigm in general, opting more for a "well, an er
by orthecreedence 11y ago
I built cl-async and a lot of its satellite libraries completely ignoring restarts and the CL error handling paradigm in general, opting more for a "well, an error occurred, catch it and send it to a callback" method.
A few lengthy discussions with some lispers who were more well-versed in CL's error handling than what would be the equivalent of try/catch/throw completely changed my view on lisp's abilities. The reasoning behind using handler-bind instead of handler-case just blew my mind once I understood it. It was a hard concept to grasp, but I'm so glad those guys pounded it in.
I reprogrammed the error handling in cl-async/blackbird/wookie/etc to use handler-bind/restarts and now everything is so much clearer. You get full stacktraces when in debug mode, but also have the option to pass errors around as objects if in production.
CL's error handling definitely was a "wow" moment for me once I got it.