#lisp - Mon 19 Mar 2007 between 04:53 and 05:03

NY Lost Funds



nowhere_manso I don't see the need to quote them
dsteubernowhere_man: Yes, :foo and ':foo both => :foo.
eructatethat's because keywords are defined as themselves
jdznowhere_man: they are special in the respect that they are bound to themselves, so the quote is not strictly necessary, but can be used for symmetry
dsteubernowhere_man: it could be a style thing. Are you talking about the AMOP book?
jdzif you use a keyword as a symbol, use the quote
nowhere_manhttp://www.lisp.org/mop/concepts.html
eructateenkrav: loop for n downfrom 99 to 0
dsteuberI just confirmed (eq :foo ':foo) => T in SBCL
eructateyou can quote any constant if you like.
sebellnowhere_man: Some people write #'(lambda () ...) too, though it's not necessary.
eructate(+ '4 '7)
dsteuberI never use the sharpquote on lambda. The macro expands to (function lambda ...) anyway.
eructate(eq (evenp 10) 't)
nowhere_maneructate: funny, I didn't know that was possible
eructatejeez, kids today...
dsteuberI don't know if LAMBDA is a special in Scheme or not. But in Lisp, it is just a macro or keyword for the special operator FUNCTION.
eructatelambda is special in scheme and in lisp
it is not "just" a macro.
dsteuberclhs: lambda
specbothttp://www.lispworks.com/reference/HyperSpec/Body/a_lambda.htm
eructateit is a special syntax marker that cannot be replaced or moved to any other symbol.
in that respect it is like special operators, except as data rather than as code
dsteuberA special operator in Lisp is one that has a different rule for evaluation than the norm.
That's all I mean.
eructatewell, no.
macros can have any rule for evaluation that you please.
dsteuber(lambda () ..) => (function lambda () ..)
eructatebut special operators are recognized internally byt the evaluator.
that's why you can't define your own
rudilambda is a macro.
dsteuberMacros only have any evaluation rule because they use special operators to do it.
eructateheh not quite.
if a macro expands into a function call with its arguments reversed, that's not "the norm"
dsteuberNo, it's perverse.
Anyway, the CLHS defines a fixed set of special operators.
eructatethe point is that both macros and special operators are exceptions to the standard argument rules. see KMP's paper http://www.nhplace.com/kent/Papers/Special-Forms.html
dsteuberI will agree with you on that point.
eructatethere could be some particular set of special operators in a lisp (whether the ones outlined by CLHS or different ones)
dsteuberAnd it is also allowed for macros to be implemented like a special operator just so long as they provide a macroexpand form.

Page: 2 9 16 23 30 37 

IrcArchive

NY Lost Funds