|nowhere_man||so I don't see the need to quote them|
|dsteuber||nowhere_man: Yes, :foo and ':foo both => :foo.|
|eructate||that's because keywords are defined as themselves|
|jdz||nowhere_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|
|dsteuber||nowhere_man: it could be a style thing. Are you talking about the AMOP book?|
|jdz||if you use a keyword as a symbol, use the quote|
|eructate||enkrav: loop for n downfrom 99 to 0|
|dsteuber||I just confirmed (eq :foo ':foo) => T in SBCL|
|eructate||you can quote any constant if you like.|
|sebell||nowhere_man: Some people write #'(lambda () ...) too, though it's not necessary.|
|eructate||(+ '4 '7)|
|dsteuber||I never use the sharpquote on lambda. The macro expands to (function lambda ...) anyway.|
|eructate||(eq (evenp 10) 't)|
|nowhere_man||eructate: funny, I didn't know that was possible|
|eructate||jeez, kids today...|
|dsteuber||I 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.|
|eructate||lambda is special in scheme and in lisp|
it is not "just" a macro.
|eructate||it 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
|dsteuber||A special operator in Lisp is one that has a different rule for evaluation than the norm.|
That's all I mean.
macros can have any rule for evaluation that you please.
|dsteuber||(lambda () ..) => (function lambda () ..)|
|eructate||but special operators are recognized internally byt the evaluator.|
that's why you can't define your own
|rudi||lambda is a macro.|
|dsteuber||Macros only have any evaluation rule because they use special operators to do it.|
|eructate||heh not quite.|
if a macro expands into a function call with its arguments reversed, that's not "the norm"
|dsteuber||No, it's perverse.|
Anyway, the CLHS defines a fixed set of special operators.
|eructate||the 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|
|dsteuber||I will agree with you on that point.|
|eructate||there could be some particular set of special operators in a lisp (whether the ones outlined by CLHS or different ones)|
|dsteuber||And it is also allowed for macros to be implemented like a special operator just so long as they provide a macroexpand form.|