From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: weis Received: (from weis@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id TAA30617 for caml-redistribution; Thu, 21 Jan 1999 19:26:40 +0100 (MET) 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 QAA21256 for ; Thu, 21 Jan 1999 16:55:16 +0100 (MET) Received: from mail6.svr.pol.co.uk (mail6.svr.pol.co.uk [195.92.193.212]) by nez-perce.inria.fr (8.8.7/8.8.7) with ESMTP id QAA01714 for ; Thu, 21 Jan 1999 16:55:13 +0100 (MET) Received: from modem-7.scandium.dialup.pol.co.uk ([62.136.10.7] helo=toy.william.bogus ident=williamc) by mail6.svr.pol.co.uk with esmtp (Exim 2.10 #1) id 103MRo-0007c4-00 for caml-list@inria.fr; Thu, 21 Jan 1999 15:55:09 +0000 Received: (from williamc@localhost) by toy.william.bogus (8.8.7/8.8.7) id PAA01429; Thu, 21 Jan 1999 15:47:14 GMT Date: Thu, 21 Jan 1999 15:47:14 GMT Message-Id: <199901211547.PAA01429@toy.william.bogus> From: William Chesters MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: caml-list@inria.fr Subject: Prefix operators in ocaml In-Reply-To: <199901211442.PAA19110@pauillac.inria.fr> References: <199901211442.PAA19110@pauillac.inria.fr> X-Mailer: VM 6.34 under Emacs 20.2.1 Sender: weis Eduardo Gimenez writes: > > Hello, > > Which is the "prefix" name in Ocaml for the multiplication on > integers? The symbols (+), (/), etc. work fine for the other > arithmetic operations, but the symbol (*) does not. LOL :) :). It's because (* begins a comment *). You have to write ( * ). This is truly disgusting and is on a par with C++'s "idiom" List > > Similarly, is there any prefix name for the list constructor (a::l) ? > I am thinking in something like (::) .... Yes, this is an example where following SML/NJ's habit of treating constructors more uniformly with functions would be advantageous. Although for all I know there may be implementation reasons not to do it.