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
Unsafe features
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2005-09-03 (12:14)
From: yoann padioleau <padator@w...>
Subject: Re: [Caml-list] Unsafe features

On 3 sept. 05, at 11:40, Florian Weimer wrote:

> * Damien Bobillot:
>>> The C language interface falls into this category.  Are there any
>>> other problematic areas?
>> The Obj.magic function. I don't know exactly what it does, but I
>> think it does arbitrary type conversions.
> Apparently, it creates a bit-wise copy of a value and assigns it a new
> type.

Are you sure ? I thought it was just a function to get rid temporary  
of the typing system,
a kind of cast operator.

But is is bad to use it, very bad, shame on you if you use it
(i just put this statement to be sure that xavier leroy will not  
shout over me).

> I discovered that there are also a couple of undocumented unsafe_*
> functions, such as String.unsafe_set, which behave the way their names
> imply (no bound schecks).
> _______________________________________________
> Caml-list mailing list. Subscription management:
> Archives:
> Beginner's list:
> Bug reports: