Version française
Home     About     Download     Resources     Contact us    
Browse thread
RE: [Caml-list] Does this function exist?
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Gurr, David (MED, self) <David.Gurr@m...>
Subject: RE: [Caml-list] Does this function exist?


> -----Original Message-----
> From: Kontra, Gergely [mailto:kgergely@mlabdial.hit.bme.hu]
> Sent: Tuesday, September 17, 2002 9:21 AM
> To: John Prevost
> Cc: Lukasz Lew; caml-list@inria.fr
> Subject: Re: [Caml-list] Does this function exist?
> 
> 
> >Doesn't matter--you still need type information.
> 
> BTW allowing polymorphism doesn't solve the problem? Ocaml is strictly
> typed, so one can figure out it's parameter in compile-type, right?
> Or wrong?

Most ML languages do type erasure rather than 
dictionary passing.  Yeah, the compiler knows the type,
but you want the runtime to know the type.  But the 
runtime doesn't know much more than int,float,closure,
pointer to something with a constructor tag.  Java's
reflection and C++ RTTI come at a price that is 
considered wrong by designers who pick type erasure.
I am a fan of reflection but I agree with Ocaml's
choices.  What you seem to want is IMHO something
that is right for debuggers and interactive toploops
but not other code, thus they not the other code should
pay the price.  Read up on implementation of ML on
JVM or MSCLR for an alternative to the Ocaml choices.
-D
PS if you are really into this, you could implement
RTTI with preprocessing via camlp4 (?or MetaOcaml?).

> Gergo
> 
> +-[Kontra, Gergely @ Budapest University of Technology and 
> Economics]-+
> |         Email: kgergely@mcl.hu,  kgergely@turul.eet.bme.hu  
>         |
> |  URL:   turul.eet.bme.hu/~kgergely    Mobile: (+36 20) 356 
> 9656     |
> +-------"Olyan langesz vagyok, hogy poroltoval kellene 
> jarnom!"-------+
> .
> Magyar php mirror es magyar php dokumentacio: http://hu.php.net
> 
> -------------------
> 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
> 
-------------------
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