Re:Ask PG: Lisp vs Python (2010)
by jcromartie on Monday October 18, 2010 @03:20PM
(#1804755)
I can't help you with strong typing, but I'm pretty sure a macro would go a long way towards implementing RAII in a Lisp.
[ Parent
| on HN ]
> I'm pretty sure a macro would go a long way towards implementing RAII in a Lisp.
Well yeah, just build the macro you need on top of unwind-protect, that's pretty standard common lisp fare.
That's true; we've already got special cases like WITH-OPEN-FILE.
Actually, you already have something better than RAII in unwind-protect. Just create whatever macro you need on top of that (I'm pretty sure with-open-file is just a macro on top of unwind-protect, Siebel seems to agree in his chapter on files) and you're done.