Guile Exceptions
Learning Guile has been on my wishlist for a while because of the power it affords users of Guix: you get to control its service manager, Shepherd[1], configure other programs, manage containers[2], all in the same powerful language in a consistent syntax. But Guile is also a power language all on its own, too. You can write standalone program with it happily (and integrate it with your Guix config seamlessly).
I recently found my first excuse to dive into the language itself (not just for Guix). My idea was to have a small, personal web server with a RESTful API[3] that lets me run, stop, and see the status and output of pre-defined tasks. I read the relevant pages in Guile’s manual many times and within a few days got something that was acceptable (though I’ll no doubt refine, refactor, and add to it as time passes).
One of the cool things I encountered with Guile were its exceptions. I’m not a programmer by trade and haven’t used many languages before, so I was mostly only familiar with “error = program implodes.” I found out Guile obviously has error, but it also has quite rich exceptions. The older system was just try + catch, but the more modern 2019+ set of features is based on records (I think), has hierarchies, and more powerful “catching.”
It was quite hard to wrap my mind around it enough to even just get off the ground, but I found these two articles very helpful, alongside the Guile manual pages on exceptions: