LWN.net Logo

PyCon: Evangelizing Python

PyCon: Evangelizing Python

Posted Apr 1, 2013 22:57 UTC (Mon) by nix (subscriber, #2304)
In reply to: PyCon: Evangelizing Python by nybble41
Parent article: PyCon: Evangelizing Python

Needless to say, nothing remotely as complicated as the protocols needed in Python to implement 'with' are needed in Lisp. The macro system and unwind-protect/dynamic-wind provides all you need, and implementing new with-*'s is a matter of a few lines of extremely not difficult code. (I emphasise this because macros can often be extremely arcane. Writing a with-blah isn't one of those: the most you have to worry about is a bit of variable capture.)


(Log in to post comments)

Copyright © 2013, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds