News for hackers. Stuff that matters.
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.
Re:Ask PG: Lisp vs Python (2010) by masklinn on Monday October 18, 2010 @05:56PM (#1805323)
> 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.

Re:Ask PG: Lisp vs Python (2010) by metageek on Monday October 18, 2010 @03:33PM (#1804807)
That's true; we've already got special cases like WITH-OPEN-FILE.
Re:Ask PG: Lisp vs Python (2010) by masklinn on Monday October 18, 2010 @05:54PM (#1805316)
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.