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 (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:
> http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list
> Archives: http://caml.inria.fr
> Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
> Bug reports: http://caml.inria.fr/bin/caml-bugs