Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

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:26)
From: Vitaly Lugovsky <vsl@o...>
Subject: Re: [Caml-list] Q: safe language
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 Archives:
Bug reports: FAQ:
Beginner's list: