From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id RAA08837; Mon, 24 Sep 2001 17:29:08 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id RAA08833 for ; Mon, 24 Sep 2001 17:29:07 +0200 (MET DST) Received: from shell5.ba.best.com (shell5.ba.best.com [206.184.139.136]) by nez-perce.inria.fr (8.11.1/8.10.0) with ESMTP id f8OFT6X25676 for ; Mon, 24 Sep 2001 17:29:07 +0200 (MET DST) Received: from localhost (bpr@localhost) by shell5.ba.best.com (8.9.3/8.9.2/best.sh) with ESMTP id IAA27694; Mon, 24 Sep 2001 08:29:02 -0700 (PDT) Date: Mon, 24 Sep 2001 08:29:02 -0700 (PDT) From: Brian Rogoff To: Sven cc: Subject: Re: [Caml-list] Haskell features in O'Caml In-Reply-To: <20010924131427.A19055@dpt-info.u-strasbg.fr> Message-ID: <20010924081901.G24529-100000@shell5.ba.best.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk 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