Browse thread
Re: [Caml-list] Haskell features in O'Caml
-
Arturo Borquez
-
Mattias Waldau
-
Dave Mason
-
Sven
- Brian Rogoff
-
Sven
-
Dave Mason
- Florian Hars
-
Mattias Waldau
[
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: | 2001-09-24 (15:29) |
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 aspects. -- Brian ------------------- Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr