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 SAA05068; Wed, 21 May 2003 18:20:05 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id SAA05042 for ; Wed, 21 May 2003 18:20:03 +0200 (MET DST) Received: from grace.speakeasy.org (grace.speakeasy.org [216.254.0.2]) by concorde.inria.fr (8.11.1/8.11.1) with SMTP id h4LGK1H23318 for ; Wed, 21 May 2003 18:20:02 +0200 (MET DST) Received: (qmail 23343 invoked by uid 36130); 21 May 2003 16:20:00 -0000 Received: from localhost (sendmail-bs@127.0.0.1) by localhost with SMTP; 21 May 2003 16:20:00 -0000 Date: Wed, 21 May 2003 09:20:00 -0700 (PDT) From: brogoff@speakeasy.net To: "erayo@cs.bilkent.edu.tr" cc: Markus Mottl , Siegfried Gonzi , "caml-list@inria.fr" Subject: Re: [Caml-list] Reading a file In-Reply-To: <200305211304.28298.exa@kablonet.com.tr> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Spam: no; 0.00; brogoff:01 caml-list:01 eray:01 ozkural:01 haskell:01 annotations:01 recursion:01 annotate:01 inference:01 argn:01 petty:01 ocaml:01 speakeasy:01 wrt:01 readable:01 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk On Wed, 21 May 2003, Eray Ozkural wrote: > Err. Yes, but anybody who's used Haskell will know that those annotations can > be handy when you're writing the code. They are harmless too, why don't we > have such a syntax? It's more than that. In Haskell 98, using polymorphic recursion requires that you explicitly annotate the recursive function. Some other languages like Clean and Mercury use type inference. OCaml requires that you explicitly annotate the functions to get polymorphic recursion, whether you use explicit polymorphism of record fields, polymorphic methods, or the experimental recursive module feature. My current opinion is that explicit annotation is the right way. WRT your main point, I agree that having a separate signature close to the function is often more readable. In OCaml, the syntax is let function_name : function_type = fun arg0 arg1 ... argN -> and while I admit that I prefer the Haskell/Clean separate signatures, this is often good enough. I'd file this one under "petty complaint" for now. There are bigger fish to fry. -- Brian ------------------- 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