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
[Caml-list] Q: safe language
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2002-08-30 (14:55)
From: Mike Lin <mikelin@M...>
Subject: Re: [Caml-list] Q: safe language
>  Ok, fixed. But I don't see any difference between segfault and NIL passed
> as file descriptor. Program fails - and it does not matter, was it "low 
> level" fault or unhandled exception or uncorrect behaviour.

It makes a big difference if you're running in a realtime system with a
shared memory model.

>  Okee. Lisp execution environment is safe. Java execution environment is 
> safe. C execution environment could be safe. But C is not a safe language,
> as well as Java and Lisp.

The meaning of "safe" is completely nebulous here. Type safety is
provided very well by OCaml. But then we have things like

# max_int;;
- : int = 1073741823
# max_int + 1;;
- : int = -1073741824

Obvious performance and practicality concerns preclude checking the
bounds on every addition operation. Nonetheless, this could without much
stretch of the imagination be called "unsafe". 


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