#lisp - Sat 24 Mar 2007 between 02:14 and 05:45

pebblestoneAnyone using mwe-defclass-formatter in Aquamacs?
snafuchs(sorry for the boinkout)
_deepfireduring compile time, it's not really possible to control the order in which macros get expanded?
hmm, i'm not sure i really depend on this
heh, it'd be nice to have a smarter version of ONCE-ONLY, which would've looked if the "onced" expression is constant
and if that would've been true, it'd just pass it through, as is
without introducing a needless binding
i hope there is such a thing as SYMBOL-MACRO-P, as otherwise the smartness of ONCE-ONLY can only buy us that much
in fact, smart ONCE-ONLY and WITH-UNIQUEW-SYMBOLS should have been standartized upon by ANSI :-)
er, -NAMES
whoops, apparently no SYMBOL-MACRO-P
this is really sad
hmm, it probably can be devised
hmm, not without side effects
i need somebody more clueful in lisp to direct me here..
i assume that (defun symbol-macro-p (sym) (not (eq (macroexpand-1 sym) sym))) is not safe, right?
cmmif the the symbol expands to self, its being a symbol-macro is inconsequental :)
also, your predicate should take an ENV parameter
also, I believe MACROEXPAND-1 returns two values. read up on the second one :)
_deepfirecmm, yes a bug, sorry
oh, wait, i'm not sure i understand your first remark
eq => not-s-m, (not eq) => s-m
cmmwell, the second ME-1 return value should be conclusive enough.
_deepfirei see, yes
cmm, but it can't be safe because of potential side-effects of the expansion?
i assume it'd have to be a language built-in, in order to be safe
cmmwell, normal compilation and interpretation are not safe from those either, so Don't Do That (c)
I mean, you never know, by the spec, when the macroexpansion happens and how many times it happens. an interpreter could macroexpand all forms it comes across, every time, and it's OK by the spec
_deepfireoh, so a s-m-p defined that way blends into the CL's expansion safety model
cmmblending into nonexistent things is easy!
_deepfireconstantp does all one needs for a strictly safe ONCE-ONLY, it seems
except, it's probably more rigorous, because the defconstants might not be in effect during the check
cmmexcept for the fact that it's OK for it to always return NIL
_deepfirethat makes it pessimistic, but not unsafe
cmmalso, relying on CONSTANTP makes for a pointless optimization, since presumably your compiler can and will do likewise
_deepfirewell, a nicer expansion :-)
cmmah, OK :)
_deepfireof course i had a second variant of ONCE-ONLY in mind
where the user would make an explicit statement that all non-symbol-macro symbols are "constant"

Page: 2 9 16