为什么有人在循环宏中的子句中使用关键字? [英] Why do some people use keywords for the clauses in the loop macro?

查看:65
本文介绍了为什么有人在循环宏中的子句中使用关键字?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

它可以解决任何问题吗?根据PCL的第一个脚注,如果不是关键字,它将在当前包中插入该符号。由于所有关键字都被插入关键字包中,因此可以防止多个符号被插入不同的包中。但是还有其他优势吗?它会产生什么问题? (我想肯定是有问题,因为它不是普遍的惯例)

Does it solve any problem? According to the first footnote of PCL, if not a keyword it interns the symbol in the current package. As all keywords are interned in the keyword package it would prevent multiple symbols being interned in different packages. But are there any other advantages? What problems does it create? (I'm guessing there must be a problem as it is not the prevalent convention)

推荐答案

不,唯一的优势是

这本身并不是一个问题,但这是使这些内容之一的原因(一些)自动自省的元素更加困难。如果您谨慎地将关键字用于LOOP关键字,则只需查看包装中插入的符号,即可轻松识别所有函数,变量和宏的名称。

This isn't a problem in and of itself, but it is one of those things that make (some) elemens of automatic introspection more difficult. If you are careful to use keywords for LOOP "keywords", you can then easily identify the names of all your functions, variables and macros by simply looking at the symbols interned in the package.

这篇关于为什么有人在循环宏中的子句中使用关键字?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆