Version française
Home     About     Download     Resources     Contact us    
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: -- (:)
From: J Farrand <farrand@c...>
Subject: Re: [Caml-list] Q: safe language

On Fri, 30 Aug 2002, Vitaly Lugovsky 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.  So for
example, C is not safe because you can derefence a bad pointer etc. and
cause a seg fault.  LISP is safe.  Even though you can apply a function to
arguments of the wrong type, LISP has well defined behaviour for dealing
with this.  (That behaviour might just be that the runtime prints an error
a halts the program, but still better than what C would do, which is
basically anything...)

--
Jim Farrand, ML Group,               mailto:farrand@cs.bris.ac.uk
Department of Computer Science,      http://www.cs.bris.ac.uk/~farrand
University of Bristol,               tel: +44-(0)117-954-5254
Woodland Road, Bristol, BS8 1UB, UK
-------------------
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