Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

user redefining standard functions

1 view
Skip to first unread message

Sam Steingold

unread,
Dec 20, 2001, 4:30:19 PM12/20/01
to
where does the spec say that user program

(defun cons (x y) (+ x y))

is non-conforming?
I just need the reference.
[OTOH, if I am wrong and the above code _is_ conforming, I would
appreciate an explanation.]

Thanks.

--
Sam Steingold (http://www.podval.org/~sds)
Keep Jerusalem united! <http://www.onejerusalem.org/Petition.asp>
Read, think and remember! <http://www.iris.org.il> <http://www.memri.org/>
Someone has changed your life. Save? (y/n)

Russell Senior

unread,
Dec 20, 2001, 4:44:57 PM12/20/01
to
>>>>> "Sam" == Sam Steingold <s...@gnu.org> writes:

Sam> where does the spec say that user program (defun cons (x y) (+ x
Sam> y))

Sam> is non-conforming? I just need the reference. [OTOH, if I am
Sam> wrong and the above code _is_ conforming, I would appreciate an
Sam> explanation.]

I think it depends on which package the defun'd cons is a member of.

<http://www.xanalys.com/software_tools/reference/HyperSpec/Body/sec_11-1-2-1-2.html>


--
Russell Senior ``The two chiefs turned to each other.
sen...@aracnet.com Bellison uncorked a flood of horrible
profanity, which, translated meant, `This is
extremely unusual.' ''

Thomas F. Burdick

unread,
Dec 20, 2001, 6:18:17 PM12/20/01
to
Sam Steingold <s...@gnu.org> writes:

> where does the spec say that user program
>
> (defun cons (x y) (+ x y))
>
> is non-conforming?
> I just need the reference.
> [OTOH, if I am wrong and the above code _is_ conforming, I would
> appreciate an explanation.]

Its behavior is undefined. So CLISP's continuable error, and CMUCL's
just bashing the old definition are both fine.

--
/|_ .-----------------------.
,' .\ / | No to Imperialist war |
,--' _,' | Wage class war! |
/ / `-----------------------'
( -. |
| ) |
(`-. '--.)
`. )----'

Michael Hudson

unread,
Dec 21, 2001, 6:23:10 AM12/21/01
to
t...@conquest.OCF.Berkeley.EDU (Thomas F. Burdick) writes:

> Sam Steingold <s...@gnu.org> writes:
>
> > where does the spec say that user program
> >
> > (defun cons (x y) (+ x y))
> >
> > is non-conforming?
> > I just need the reference.
> > [OTOH, if I am wrong and the above code _is_ conforming, I would
> > appreciate an explanation.]
>
> Its behavior is undefined. So CLISP's continuable error, and CMUCL's
> just bashing the old definition are both fine.

I once, while folling around writing a algebraic manipulator, typed

(defun reduce (...)
...)

Oops. CMUCL didn't like that too much.

Cheers,
M.

Thomas F. Burdick

unread,
Dec 21, 2001, 7:58:40 PM12/21/01
to
Michael Hudson <m...@python.net> writes:

I'm guessing we cmucl users all have at least one horror story of
doing something stupid to the cl package. I'm prone to writing
functions called prin1-foo and princ-foo. Oooh, don't redefine prin1
if you want to ever get another prompt (debugger or otherwise) in that
image ;-)

0 new messages