Prev: worst concept in computer science [Was: to RG - Lisp lunacyand Perl psychosis]
Next: Configuration file setup and pathname usage
From: Raymond Toy on 12 Mar 2010 14:27 If FOO is already a macro, what should (compile 'foo ...) do? The CLHS says the macro function should be updated, but it's not clear to me what it should be updated to. Apparently Lispworks and SBCL update the macro function with the new definition. ACL, CCL, and Clisp replace the macro function with a function. ACL and Clisp do this silently but CCL produces a continuable error for this. CMUCL seems to be confused. It sets the fdefinition but also leaves the macro function. Ray
From: RG on 12 Mar 2010 14:54 In article <7_adnXWgiekWCAfWnZ2dnUVZ_vmdnZ2d(a)earthlink.com>, Raymond Toy <toy.raymond(a)gmail.com> wrote: > If FOO is already a macro, what should (compile 'foo ...) do? The CLHS > says the macro function should be updated, but it's not clear to me what > it should be updated to. To the new definition. What else could it possibly be? > Apparently Lispworks and SBCL update the macro > function with the new definition. That would be correct. > ACL, CCL, and Clisp replace the macro > function with a function. That would be a bug. The spec is clear that it is the macro function that is to be updated. rg
From: Rainer Joswig on 12 Mar 2010 15:12 In article <rNOSPAMon-12BA0F.11541212032010(a)news.albasani.net>, RG <rNOSPAMon(a)flownet.com> wrote: > In article <7_adnXWgiekWCAfWnZ2dnUVZ_vmdnZ2d(a)earthlink.com>, > Raymond Toy <toy.raymond(a)gmail.com> wrote: > > > If FOO is already a macro, what should (compile 'foo ...) do? The CLHS > > says the macro function should be updated, but it's not clear to me what > > it should be updated to. > > To the new definition. What else could it possibly be? > > > Apparently Lispworks and SBCL update the macro > > function with the new definition. > > That would be correct. > > > ACL, CCL, and Clisp replace the macro > > function with a function. > > That would be a bug. The spec is clear that it is the macro function > that is to be updated. > > rg From the CLHS page for COMPILE: 'if name is a symbol that names a macro, its macro function is updated' I would also say that this is clear. -- http://lispm.dyndns.org/
From: Helmut Eller on 12 Mar 2010 16:17 * Rainer Joswig [2010-03-12 21:12+0100] writes: > From the CLHS page for COMPILE: > > 'if name is a symbol that names a macro, its macro function is updated' The whole sentence is: If a non-nil name is given, then the resulting compiled function replaces the existing function definition of name and the name is returned as the primary value; if name is a symbol that names a macro, its macro function is updated and the name is returned as the primary value. > I would also say that this is clear. Are you saying that those two clauses are mutually exclusive? "update" could also mean "remove the macro binding". Helmut
From: joswig on 12 Mar 2010 16:42
On 12 Mrz., 22:17, Helmut Eller <eller.hel...(a)gmail.com> wrote: > * Rainer Joswig [2010-03-12 21:12+0100] writes: > > > From the CLHS page for COMPILE: > > > 'if name is a symbol that names a macro, its macro function is updated' > > The whole sentence is: > > If a non-nil name is given, then the resulting compiled > function replaces the existing function definition of name and the name is > returned as the primary value; if name is a symbol that names a macro, its > macro function is updated and the name is returned as the primary value. > > > I would also say that this is clear. > > Are you saying that those two clauses are mutually exclusive? > "update" could also mean "remove the macro binding". > > Helmut 'its macro function is updated' - what is not clear? It does not say 'removed'. |