From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from weis@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id NAA18559 for caml-red; Fri, 15 Dec 2000 13:59:37 +0100 (MET) 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 NAA10268 for ; Fri, 15 Dec 2000 13:47:32 +0100 (MET) Received: from pauillac.inria.fr (pauillac.inria.fr [128.93.11.35]) by concorde.inria.fr (8.11.1/8.10.0) with ESMTP id eBFClUj17303; Fri, 15 Dec 2000 13:47:30 +0100 (MET) Received: (from weis@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id NAA30942; Fri, 15 Dec 2000 13:47:24 +0100 (MET) From: Pierre Weis Message-Id: <200012151247.NAA30942@pauillac.inria.fr> Subject: Re: Functions must be explicitly typed, (was Same label in different types, how do people solve this?) In-Reply-To: <5lpuiuzvy9.fsf@rum.cs.yale.edu> from Stefan Monnier at "Dec 14, 100 01:42:06 pm" To: monnier+lists.caml/news/@RUM.cs.yale.edu (Stefan Monnier) Date: Fri, 15 Dec 2000 13:47:24 +0100 (MET) Cc: caml-list@inria.fr X-Mailer: ELM [version 2.4ME+ PL28 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: weis@pauillac.inria.fr > >>>>> "Mattias" == Mattias Waldau writes: > > I don't really see the use of infering types for functions. It works for one I would like to note that type inference (i.e. code without annotations) helps a lot when developing programs: the annotation free code is not only easier to write but also easier to maintain since it is kind of ``auto-adaptative'' and resistant to reorganisations and names modifications. As an example, consider a function with an explicit profile: let (type_type_definition : Synt.td -> ...) = function ... If we consider renaming the module Synt into Syntax, and the type td into type_definition to reflect as closely as possible the intended meanings, we would have to edit the definition of the function (and the definition of every function that uses either the module Synt or the type td). By contrast, if we omit manual type annotations, the type checker will silently change the type assigments as necessary. It is extremely convenient when writing systems that are rapidly evolving. Hope this helps, Pierre Weis INRIA, Projet Cristal, Pierre.Weis@inria.fr, http://cristal.inria.fr/~weis/