Newsgroups: comp.lang.scheme
Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!think.com!barmar
From: barmar@think.com (Barry Margolin)
Subject: Re: Why memq vs memv vs member, etc.?
Message-ID: <1991May18.182844.5668@Think.COM>
Sender: news@Think.COM
Reply-To: barmar@think.com
Organization: Thinking Machines Corporation, Cambridge MA, USA
References: <chip.674143084@soi> <chip.674492719@soi> <5816@goanna.cs.rmit.oz.au>
Date: Sat, 18 May 91 18:28:44 GMT

[I wrote]
>> >I guess the only problem with optimizing out the explicit passing of
>> >the eq argument is that Scheme doesn't prohibit user programs from
>> >redefining standard procedure names as Common Lisp does.  
In article <5816@goanna.cs.rmit.oz.au> ok@goanna.cs.rmit.oz.au (Richard A. O'Keefe) writes:
>Looking at CLtL2, section 5.3.1, all I can see that bears on this is
>the final paragraph:
>	It is permissible to use DEFUN to redefine a function,
>	to install a corrected version of an incorrect definition,
>	for example.
>	It is permissible to redefine a macro as a function.
>	It is an error to attempt to redefine the name of a ***special form***
>	(see table 5-1) as a function.
>I have not been able to find the alleged prohibition in the indexed pages
>describing DEFUN, FLET, or LABELS.  Given that MEMBER is not a special form,
>what section of CLtL2 prohibits redefinition?

It's in an obscure place, p.260.  It is a list of restrictions on what an
implementation or program may do to symbols in the COMMON-LISP package,
which is why it's in the Packages chapter.  It specifically prohibits
portable programs from defining or binding such symbols as functions or
macros (this is our only concession to "macro hygiene").

>Also, the analysis advantage, if it does exist, would only apply to
>predefined function names.  

That's what I meant by "standard procedure names".
-- 
Barry Margolin, Thinking Machines Corp.

barmar@think.com
{uunet,harvard}!think!barmar
