Mailing list for all users of the OCaml language and system.
 help / color / mirror / Atom feed
From: Pierre Weis <Pierre.Weis@inria.fr>
To: monnier+lists.caml/news/@RUM.CS.YALE.EDU (Stefan Monnier)
Cc: caml-list@inria.fr
Subject: Re: Redefinition doesn't work
Date: Thu, 2 Nov 2000 16:42:30 +0100 (MET)	[thread overview]
Message-ID: <200011021542.QAA07895@pauillac.inria.fr> (raw)
In-Reply-To: <39ff158f$1@tequila.cs.yale.edu> from Stefan Monnier at "Oct 31, 100 01:55:11 pm"

> >>>>> "Pierre" == Pierre Weis <Pierre.Weis@inria.fr> writes:
> > It is not only a question of type. As I mentioned in my previous
> > message, if you allow the user to ``rebind'' some basic functions,
> > such as map or iter, the behaviour of the compiler can be
> > unpredictable.
> 
> It never seems to bother Lisp users.
> 
> 
>         Stefan

Absolutely right. In the same vein we have: the absence of static
type-checking ``never seems to bother Lisp users'', the absence of GC
``never seems to bother C users'', the absence of dynamically
allocated arrays ``never seems to bother Pascal users'', the absence
of pattern matching ``never seems to bother Pascal users''...

So what ? Users of these languages have very often to fight against
the absence of these features. In Caml, we chose to provide them to
the user in a simple and rigorous way.

Conversely, we try to avoid the addition of features that can confuse
the users in some situations (and in my mind the rebinding of
identifiers belongs to this category). To be precise, I implemented
this feature long time ago in Caml: it was named the #relet directive
of the toplevel. It had the type-checking constraints I mentioned. So
it was safe. But it was confusing, since people quickly started to
imagine that it meant : everything that mentioned the old function
should now behave as if the old function were the new one. So they
asked this relet feature to be applied recursively everywhere in their
programs, including partially applied functions or even totally
applied functions such as constants expressed as a call to a rebound
function (something like: I relet fib, but my x, defined as let x =
fib 20, has not changed, it still uses the old value of fib!). We
ended up by saying: if you want to obtain this effect, you just have
to reload the entire program ...

So better start by saying ``if you want to obtain this effect, you
just have to reload the entire program''!

Pierre Weis

INRIA, Projet Cristal, Pierre.Weis@inria.fr, http://cristal.inria.fr/~weis/




  reply	other threads:[~2000-11-02 18:27 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <200010300739.IAA13016@pauillac.inria.fr>
2000-10-30 23:38 ` Jaeyoun Chung
2000-10-31 11:06   ` Pierre Weis
2000-10-31 11:52     ` Sven LUTHER
2000-10-31 16:47       ` Pierre Weis
2000-10-31 18:55         ` Stefan Monnier
2000-11-02 15:42           ` Pierre Weis [this message]
2000-11-03  3:10             ` Stefan Monnier
2000-11-03  8:44             ` Good programming languages (Was: Redefinition doesn't work) Mattias Waldau
2000-11-03 15:27               ` bcpierce
2000-11-06  0:17                 ` Jacques Garrigue
2000-11-08 18:42                 ` Markus Mottl
2000-11-09 16:20                   ` Juan J. Quintela
2000-11-10 10:06                     ` Markus Mottl
2000-11-13  7:48                       ` Stephan Houben
2000-11-10 19:06                     ` Remi VANICAT
2000-11-06  6:17               ` Francisco Reyes
2000-11-07 17:36                 ` Brian Rogoff
2000-10-31 14:16     ` Redefinition doesn't work Frank Atanassow
2000-10-31 17:07       ` Pierre Weis
2000-10-31 17:26         ` LINUX MANDRAKE -> CAMLTK? mlf
2000-11-02 20:21           ` Pierre Weis
2000-11-02 22:45 Redefinition doesn't work Ruchira Datta
2000-11-03  9:13 ` Pierre Weis
2000-11-03 10:09   ` Michael Sperber [Mr. Preprocessor]
2000-11-03 16:56     ` Pierre Weis
2000-11-03 17:36       ` Michel Mauny
2000-11-05 11:15       ` Michael Sperber [Mr. Preprocessor]
2000-11-06 21:30         ` Bruce Hoult
2000-11-03 16:58   ` Pierpaolo BERNARDI
2000-11-06  9:29     ` Stephan Houben
2000-11-03 17:30   ` Stefan Monnier
2000-11-05 11:16     ` Michael Sperber [Mr. Preprocessor]
  -- strict thread matches above, loose matches on Subject: below --
2000-10-31 19:11 Ruchira Datta
2000-11-02 18:05 ` Trevor Jim
2000-10-28  7:32 Mattias Waldau
2000-10-28 16:37 ` Pierre Weis

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200011021542.QAA07895@pauillac.inria.fr \
    --to=pierre.weis@inria.fr \
    --cc=caml-list@inria.fr \
    --cc=monnier+lists.caml/news/@RUM.CS.YALE.EDU \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox