The less-familiar parts of Lisp for beginners — with-slots

We recently covered the with-accessors macro.  That allowed the programmer to create a lexical environment in which a symbol substituted for a call to an accessor in a particular instance.  The with-slots macro is essentially the same, but rather than using one of the class’ accessors, it expands into a slot-value call.  We’ve discussed when slot-value is recommended, those considerations also apply, naturally, to with-slots.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

*

反垃圾邮件 / Anti-spam question * Time limit is exhausted. Please reload CAPTCHA.