From: Sam Steingold
Subject: (special-operator-p 'and)
Date: 
Message-ID: <m3of97a6o8.fsf@loiso.podval.org>
If an implementation implements macro AND as a special operator,
should (SPECIAL-OPERATOR-P 'AND) return T?

Section 3.1.2.1.2.2 "Macro Forms" explicitly permits implementing
standard macros as special operators.
OTOH, the glossary says

  special operator n. one of a fixed set of symbols, enumerated in
   Figure 3-2, that may appear in the car of a form in order to identify
   the form as a special form.

(Figure 3-2 does not list AND, of course.)

I thought that the answer was obviously "yes" (and this appears to be
supported by the implementations), but I encountered someone who
disagreed and I wonder if I could be wrong here...

-- 
Sam Steingold (http://www.podval.org/~sds) running RedHat8 GNU/Linux
<http://www.camera.org> <http://www.iris.org.il> <http://www.memri.org/>
<http://www.mideasttruth.com/> <http://www.palestine-central.com/links.html>
I'm a Lisp variable -- bind me!
From: Nils Goesche
Subject: Re: (special-operator-p 'and)
Date: 
Message-ID: <87d6pny0v2.fsf@darkstar.cartan>
Sam Steingold <···@gnu.org> writes:

> If an implementation implements macro AND as a special
> operator, should (SPECIAL-OPERATOR-P 'AND) return T?

> OTOH, the glossary says
> 
>   special operator n. one of a fixed set of symbols, enumerated in
>    Figure 3-2, that may appear in the car of a form in order to identify
>    the form as a special form.
> 
> (Figure 3-2 does not list AND, of course.)
> 
> I thought that the answer was obviously "yes" (and this appears
> to be supported by the implementations), but I encountered
> someone who disagreed and I wonder if I could be wrong here...

FWIW, I think the answer is obviously ``no�� :) The mere
existence of the list given in `3.1.2.1.2.1 Special Forms�
clearly indicates that the set of Common Lisp special operators
is intended to be _fixed_ and defined.  The set of special
operators is known and the same in all implementations.

To make this easier for implementors:

> Section 3.1.2.1.2.2 "Macro Forms" explicitly permits
> implementing standard macros as special operators.

and the end of that sentence reads

# [...], but only if an equivalent definition of the macro is
# also provided.

So, you have a possibility to hide the fact that you implement
AND as a special operator and keep the user under the illusion
that everything is just fine as defined by the spec.

That's what I always thought it means, anyway: We should always
get the same list as in Lispworks:

CL-USER 11 > (pprint (sort (loop for sym being the external-symbols of "CL"
                                 when (special-operator-p sym)
                                 collect sym) #'string<))

(BLOCK CATCH
  EVAL-WHEN
  FLET
  FUNCTION
  GO
  IF
  LABELS
  LET
  LET*
  LOAD-TIME-VALUE
  LOCALLY
  MACROLET
  MULTIPLE-VALUE-CALL
  MULTIPLE-VALUE-PROG1
  PROGN
  PROGV
  QUOTE
  RETURN-FROM
  SETQ
  SYMBOL-MACROLET
  TAGBODY
  THE
  THROW
  UNWIND-PROTECT)

Regards,
-- 
Nils G�sche
Ask not for whom the <CONTROL-G> tolls.

PGP key ID #xD26EF2A0