From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from weis@localhost) by pauillac.inria.fr (8.6.10/8.6.6) id SAA05569 for caml-redistribution; Thu, 25 Jul 1996 18:59:10 +0200 Received: (from mauny@localhost) by pauillac.inria.fr (8.6.10/8.6.6) id OAA01398; Thu, 25 Jul 1996 14:26:41 +0200 Message-Id: <199607251226.OAA01398@pauillac.inria.fr> Subject: Re: Language improvements (?) To: Pierre.Weis@inria.fr (Pierre Weis) Date: Thu, 25 Jul 1996 14:26:40 +0200 (MET DST) Cc: christo@nextsolution.co.jp, caml-list@pauillac.inria.fr In-Reply-To: <199607240844.KAA21840@pauillac.inria.fr> from "Pierre Weis" at Jul 24, 96 10:44:17 am From: Michel.Mauny@inria.fr (Michel Mauny) Reply-to: Michel.Mauny@inria.fr Organization: INRIA, BP 105, F-78153 Le Chesnay Cedex, France Phone: (+33) 1 39 63 57 96 -- Fax: (+33) 1 39 63 53 30 MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: weis > > Third, since the trend in O'Caml is toward curried function types, > > it would be useful to be able to section binary operators as in > > Haskell, e.g., "(1+)" would mean "(function x -> 1 + x)". Your example works in ocaml: (+) 1 denotes the function above. But, the only way to partially apply (+) to its second argument is to give a name to the first one as in (fun x -> x+2). Personnally, I don't think sections are really useful. > > And, at the risk of instigating a syntax war, I would prefer a more > > Haskell-like syntax overall; for example, offside scoping, I don't like it either. (And it would be a really pain to implement it with Yacc, I think -- if ever possible.) > > [Type constructors with] uppercase types so > > there is no need for quotes in front of type variables, > No, no, we already exhausted uppercase conventions with modules, > constructors, labels, and let bound identifiers. Here, I disagree with Pierre: it would be possible because type constructors occur only in very specific contexts. The parser just has to consider that a type constructor (putting aside the arrow) is a (possibly empty) module access path preceeding an uppercase identifier, that is the type name. There is no conflict with the other usage of uppercase idents (data constructors) because they occur in different contexts. However, writing type expressions as in Haskell is probably just a cosmetic issue. -- Michel