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] Haskell features in O'Caml
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Brian Rogoff <bpr@b...>
Subject: Re: [Caml-list] Haskell features in O'Caml
On Mon, 24 Sep 2001, Sven wrote:
[...snip alternatives for type annotation in OCaml ...]
> But you have to recognize that non of these solution is as elegant as the
> haskel way of doing it, isn't ti ?

Agreed. Though the original poster probably wan't interested, it's also
the case that Haskell can use the annotations to get polymorphic recursion
and OCamlists have to butcher the code by either rewriting into a sometimes
less clear form or applying the sledge hammer of the unsafe cast operation.

> maybe this would be nice :
> val mul : int -> int -> int
> let mul x y = ...
> Sure, i know the right way is to put the declaration of mul in a separate
> file, but still, it would be nice to be able to do it in one file only.

I think it makes sense to have the annotations *apart* from their use in
signatures. Someone else mentions the "debugging by adding type annotations"
style, which I've used a bit myself (I'm shameless) and has a lot of nice

-- Brian

Bug reports:  FAQ:
To unsubscribe, mail  Archives: