If you love that idea but don't mind the switching out the language, CLOG [1] does this on Common Lisp.
[1] https://github.com/rabbibotton/clog