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
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 (09:40)
From: Florian Weimer <fw@d...>
Subject: Re: [Caml-list] Unsafe features
* 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.

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).