English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis à jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml à l'adresse ocaml.org.

Browse thread
Re: Redefinition doesn't work
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2000-11-06 (20:09)
From: sperber@i...
Subject: Re: Redefinition doesn't work
>>>>> "Pierre" == Pierre Weis <Pierre.Weis@inria.fr> writes:

Pierre> Mike Friede wrote:

Pierre> Scheme has lexical scoping <EM>locally</EM>. It has dynamic binding
Pierre> globally,
>> No.

Pierre> I'm very surprised, since I find in the R5RS, a clear distinction
Pierre> between top level definitions that are said to be equivalent to
Pierre> assigments


Pierre> (i.e. top level definitions are treated dynamically):

This is a different issue.  I probably misunderstood you.
Traditionally, dynamic binding means something like this:

(define x 1)
(define (f)
(let ((x 2))

Under dynamic binding (and, in fact, in languages like Common Lisp),
the last expression returns 2.

Binding is not the same thing as assignment.

Pierre> Good! So for built-in procedures we also get static binding at toplevel!

I don't understand what this means: R5RS merely says, that, by
redefining, say, CAR, you won't break MAP.

Pierre> May be it is a bug of the Scheme I used, or may be your Section 6 is
Pierre> new with respect to the Scheme I used (the report on Scheme was known
Pierre> as R3 at the time).

Right.  I believe this was introduced in R4RS or R5RS.

Cheers =8-} Mike
Friede, Völkerverständigung und überhaupt blabla