From: Fermin Reig <reig@ropas.kaist.ac.kr>
To: caml-list@inria.fr
Subject: Question on language design (keywords vs Pervasives)
Date: Fri, 18 Aug 2000 11:07:05 +0900 (KST) [thread overview]
Message-ID: <200008180207.LAA05417@ropas.kaist.ac.kr> (raw)
Hi,
I'm curious about some interesting language design choices in ocaml
3.0.
* "raise", "exn" are not keywords, but definitions in the Pervasives module.
This means that I can rebind them, for ex., like this:
# type exn = char;;
type exn = char
# let raise x = x + 1;;
val raise : int -> int = <fun>
Similarly for other types in the Pervasives module, like int,
etc. (However, "exception", for declaring a new exception is a
reserved word).
I can speculate that the intention is precisely that praogrammers be
able to rebind them at will, or maybe that it simplifies implementing
interpreters/compilers, but I don't know for sure. Could anyone
(preferably someone involved in the design) comment on the rationale
for these choices?
Thanks,
Fermin Reig
------------------------------------------------------
Department of Computing Science, University of Glasgow
http://www.dcs.gla.ac.uk/~reig
next reply other threads:[~2000-08-18 11:16 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-08-18 2:07 Fermin Reig [this message]
2000-08-19 16:57 ` Frank Atanassow
2000-08-20 19:01 ` Pierre Weis
2000-08-20 19:55 ` John Prevost
2000-08-21 8:58 ` Pierre Weis
2000-08-21 19:47 ` John Prevost
2000-08-21 21:41 ` Pierre Weis
2000-08-21 16:44 ` John Max Skaller
2000-08-21 21:24 ` Pierre Weis
2000-08-22 0:38 ` Kwangkeun Yi
2000-08-22 2:25 ` John Max Skaller
2000-08-22 9:08 ` Pierre Weis
2000-08-22 8:31 ` 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=200008180207.LAA05417@ropas.kaist.ac.kr \
--to=reig@ropas.kaist.ac.kr \
--cc=caml-list@inria.fr \
--cc=reig@dcs.gla.ac.uk \
/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