From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id QAA08349; Fri, 30 Aug 2002 16:26:51 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id QAA08336 for ; Fri, 30 Aug 2002 16:26:50 +0200 (MET DST) Received: from mg.ihep.su (mg.ihep.su [194.190.161.38]) by nez-perce.inria.fr (8.11.1/8.11.1) with ESMTP id g7UEQnD20765 for ; Fri, 30 Aug 2002 16:26:49 +0200 (MET DST) Received: by mg.ihep.su (Postfix, from userid 65436) id E3A3BB5526; Fri, 30 Aug 2002 18:26:44 +0400 (MSD) Received: from ontil.ihep.su (ontil.ihep.su [194.190.161.63]) by mg.ihep.su (Postfix) with ESMTP id B6254B511A; Fri, 30 Aug 2002 18:26:43 +0400 (MSD) Received: from localhost (vsl@localhost) by ontil.ihep.su (8.11.6/8.11.6) with ESMTP id g7UEQ7i03445; Fri, 30 Aug 2002 18:26:07 +0400 Date: Fri, 30 Aug 2002 18:26:07 +0400 (MSD) From: Vitaly Lugovsky To: J Farrand Cc: David Frese , SooHyoung Oh , Caml-list Subject: Re: [Caml-list] Q: safe language In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk On Fri, 30 Aug 2002, J Farrand wrote: > > No. In this place program may be expecting some structure, which can > > contain NIL. There is no other way in lisp to define structures - so, any > > code accepting lists will accept any alien structure. Is is type safety? > > No way! Dynamically typed languages can't be safe. > > "Safe" is not the same as "Type Safe". ISTR safe means that a program > written in the language will not cause a machine level error. 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. > So for > example, C is not safe because you can derefence a bad pointer etc. and > cause a seg fault. Run C in a bytecode "safe" environment (there are some C implementations with this functionality) - and it will become a "safe language"? > LISP is safe. 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. > Even though you can apply a function to > arguments of the wrong type, LISP has well defined behaviour for dealing > with this. And C runtime environment can have a well defined behaviour of what to do with wrong pointers. ------------------- 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