From: "Mattias Waldau" <mattias.waldau@abc.se>
To: "Caml-List" <caml-list@inria.fr>
Subject: Redefinition doesn't work
Date: Sat, 28 Oct 2000 09:32:31 +0200 [thread overview]
Message-ID: <HDEEKOMJILGEIHIMAPCDEEGCDEAA.mattias.waldau@abc.se> (raw)
One of the reason of me liking OCaml is the interactive top level. However,
it is a bit messy always remember to redefine all functions that depend of
the function you just corrected.
For example below, f2 doesn't notice the redefinition of f1, even if the
types of the new and old definition of f1 are the same.
The last language I used that had this feature was Forth, and that was 20
years ago, we used 8Kb of memory and a 6502. These 8 Kb contained both the
interactive compiler, the program, and the data.
What is the reason for this misfeature?
# let f1 () = 10;;
val f1 : unit -> int = <fun>
# let f2 () = (f1 ()) * 10;;
val f2 : unit -> int = <fun>
# f2 ();;
- : int = 100
# let f1 () = 20;;
val f1 : unit -> int = <fun>
# f2 ();;
- : int = 100
#
----
Mattias Waldau
next reply other threads:[~2000-10-28 16:37 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-10-28 7:32 Mattias Waldau [this message]
2000-10-28 16:37 ` Pierre Weis
[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
2000-11-03 3:10 ` Stefan Monnier
2000-10-31 14:16 ` Frank Atanassow
2000-10-31 17:07 ` Pierre Weis
2000-10-31 19:11 Ruchira Datta
2000-11-02 18:05 ` Trevor Jim
2000-11-02 22:45 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]
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=HDEEKOMJILGEIHIMAPCDEEGCDEAA.mattias.waldau@abc.se \
--to=mattias.waldau@abc.se \
--cc=caml-list@inria.fr \
/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