Prev: Which is the best implementation of LISP family of languagesfor real world programming ?
Next: ██▓▒░░FREE SOFTWARE░▒░▒▓██
From: edgar-rft on 11 Jun 2010 17:01 Kazimir Majorinc schrieb: > Was it possible to define that? > > If yes, how it was practiced? > Attrib or there was some more direct way? > > I don't think that exegesis of manual can answer > on that question "beyond reasonable doubt", so it > would be nice if someone has some other source of > information. The answer depends on the meaning of "define"... It is not possible to add build-in special forms in Lisp but every Lisp macro can break the Lisp evaluation rules by manipulating the arguments or control the evaluation order. See Graham's "On Lisp" for a huge collection of such macros: http://www.paulgraham.com/onlisp.html - edgar
From: Pascal J. Bourguignon on 11 Jun 2010 20:02
edgar-rft <edgar(a)web.de> writes: > Kazimir Majorinc schrieb: >> Was it possible to define that? >> >> If yes, how it was practiced? >> Attrib or there was some more direct way? >> >> I don't think that exegesis of manual can answer >> on that question "beyond reasonable doubt", so it >> would be nice if someone has some other source of >> information. > > The answer depends on the meaning of "define"... > > It is not possible to add build-in special forms in Lisp but > every Lisp macro can break the Lisp evaluation rules by > manipulating the arguments or control the evaluation order. > > See Graham's "On Lisp" for a huge collection of such macros: > > http://www.paulgraham.com/onlisp.html Lisp macros weren't invented yet in LISP 1. Look on page 117, in the code of the evaluator. There are FSUBR and FEXPR, which denote primitives and lisp functions that get their arguments unevaluated (notice list instead of evlist). Using these kind of functions, you could implement run-time "macros", or special operators. -- __Pascal Bourguignon__ http://www.informatimago.com/ |