[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| From: | Christophe TROESTLER <debian00@t...> |
| Subject: | Re: [Caml-list] about Obj.magic |
On Fri, 31 May 2002, Jacques Garrigue <garrigue@kurims.kyoto-u.ac.jp> wrote:
>
> From: "Warp" <warplayer@free.fr>
>
> > > So, we should be very careful to use 'Obj.magic'. Can somebody tell me
> > > the appropriate situation to use this function?
> >
> > One case can be 'almost-legal' : downcasting an object [...]
>
> By the way, here is a simple way to do downcasts, when really
> needed. [...] No need to do anything unsafe.
Is there any safe way to check whether a "kind : ('a, 'b)
Bigarray.kind" parameter is "float64", "complex64",... or are we bound
to do
kind = (Obj.magic float64 : ('a, 'b) Bigarray.kind)
Cheers,
ChriS
-------------------
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