Newsgroups: comp.lang.lisp
Path: cantaloupe.srv.cs.cmu.edu!das-news2.harvard.edu!news2.near.net!howland.reston.ans.net!pipex!uknet!festival!edcogsci!jeff
From: jeff@aiai.ed.ac.uk (Jeff Dalton)
Subject: Re: Macros vs. Special opertors (was Re: SETQ is to SET as LET is to ???)
Message-ID: <CzopDG.M06@cogsci.ed.ac.uk>
Keywords: lisp, common lisp, progv, let, unwind-protect, special form
Sender: usenet@cogsci.ed.ac.uk (C News Software)
Nntp-Posting-Host: bute-alter.aiai.ed.ac.uk
Organization: AIAI, University of Edinburgh, Scotland
References: <3ae8as$p13@peaches.cs.utexas.edu> <CzFG78.5Hu@cogsci.ed.ac.uk> <3aiuup$t04@tools.near.net>
Date: Tue, 22 Nov 1994 19:41:40 GMT
Lines: 38

In article <3aiuup$t04@tools.near.net> barmar@nic.near.net (Barry Margolin) writes:
>In article <CzFG78.5Hu@cogsci.ed.ac.uk> jeff@aiai.ed.ac.uk (Jeff Dalton) writes:
>>While I agree that the posted macro has problems and that PROGV
>>should be a special form, something can be a macro in CL without
>>any particular definition being given.  Moreover, such macros
>>can use implementation-specific functions (at least).
>
>I believe the intent of the committee when deciding which things should be
>special operators rather than macros is that it should be possible to write
>a program analysis program by putting recognizers only for the standard
>special operators.  If an operator is specified to be a macro, the program
>should be able to macroexpand it and eventually reach a function call or a
>standard special form.

I'm pretty sure that nothing prevents PROGV from begin defined as

  (defmacro progv (&rest whatever)
    `(do-a-progv-somehow ',whatever))

  (defun do-a-progv-somehow (args)
    (whatever-magic-internal-stuff-you-want args))

I'm also pretty sure nothing prevents analogous definitions
of other supposedly special forms.

This wasn't blocked by CLtL, at least, and I don't recall the
loophole being plugged.

The problem, of course, is that reaching a function may do you
no good (if you're analyzing code).

But suppose the intent you mention above had been realized
in spirit as well as in letter.  (My do-a-progv-somehow is
consistent with the letter).

Why would PROGV then have to be a special form?

-- jeff
