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
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: 2002-09-18 (23:01)
From: Gurr, David (MED, self) <David.Gurr@m...>
Subject: RE: [Caml-list] Does this function exist?

> -----Original Message-----
> From: Kontra, Gergely []
> Sent: Tuesday, September 17, 2002 9:21 AM
> To: John Prevost
> Cc: Lukasz Lew;
> 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.
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:,  
>         |
> |  URL:    Mobile: (+36 20) 356 
> 9656     |
> +-------"Olyan langesz vagyok, hogy poroltoval kellene 
> jarnom!"-------+
> .
> Magyar php mirror es magyar php dokumentacio:
> -------------------
> To unsubscribe, mail Archives: 
> Bug reports: FAQ: 
> Beginner's list:
To unsubscribe, mail Archives:
Bug reports: FAQ:
Beginner's list: