Skip to content

Comment on What's a condition system and why do you want one?parent

Comments

You can get most of the way there using such an approach, but it'll never feel quite "right" unless your language gives you lots of syntactic sugar to play with.

You've also got to be careful about how your handler stack interacts with threads and/or coroutines.

For an example that I think same up pretty well, but certainly not as elegant as the system built into lisp, check out my "withrestart" python module: https://github.com/rfk/withrestart

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.