caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] Safe Caml for online teaching
@ 2002-02-20 15:15 Martin Jambon
  2002-02-20 15:53 ` Alain Frisch
  2002-02-21 10:59 ` Xavier Leroy
  0 siblings, 2 replies; 8+ messages in thread
From: Martin Jambon @ 2002-02-20 15:15 UTC (permalink / raw)
  To: caml-list

Is the following proposal completely crazy or could it be done (or both?):

The insertion of Caml-toplevel forms in Caml online HTML manuals could be
attractive for beginners since it doesn't require the installation of Caml
on the local machine.

This would require a strict control over the code that the user will want
to be compiled and executed on the server.
(we already discussed such things last week on the beginners' list
http://groups.yahoo.com/group/ocaml_beginners/messagesearch?query=interactive%20learning)

Now I think the following extensions to Caml could provide a way to
achieve a sufficient level of safety:

- every value is either "safe" or "unsafe" (independently from its type)
- 2 compilation modes would be available:
   + unsafe mode: allows to make safe values of unsafe ones
   + safe mode: prohibits the use of unsafe values (in the current module)
   + safe-compiled and unsafe-compiled modules may be linked freely
- inheritance:
   + imported values (using keyword "external") are unsafe
   + every piece of code that uses unsafe data is unsafe, otherwise it is
     safe.
- compatibility: default mode = unsafe mode
- syntax examples (for unsafe-mode-designed modules):
   .mli and .ml:
     safe external <ident> : <type> = ...
   .mli:
     safe val <ident> : <type>
   .ml:
     let safe <ident> = ...

- requirements:
   + additions to the compiler...
   + addition of safety annotations at least in the standard library


Well, this would require a non-negligible amount of concertation,
expertise and coding. It seems to me much cleaner than deleting parts of
the standard library (and others) and suppressing the "external" construct
by some syntaxic preprocessing.

An interactive Caml book would also require a strong and brave HTTP
server :-)


Martin


-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2002-02-23 18:42 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-02-20 15:15 [Caml-list] Safe Caml for online teaching Martin Jambon
2002-02-20 15:53 ` Alain Frisch
2002-02-20 16:22   ` james woodyatt
2002-02-20 17:13     ` Martin Jambon
2002-02-20 19:16       ` Christophe Raffalli
2002-02-20 16:38   ` Martin Jambon
2002-02-20 17:35     ` Remi VANICAT
2002-02-21 10:59 ` Xavier Leroy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).