Date: Thu, 21 Jan 1999 15:47:14 GMT
Message-Id: <199901211547.PAA01429@toy.william.bogus>
From: William Chesters <williamc@dai.ed.ac.uk>
To: caml-list@inria.fr
Subject: Prefix operators in ocaml
In-Reply-To: <199901211442.PAA19110@pauillac.inria.fr>
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<Array<int> >
> 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.
This archive was generated by hypermail 2b29 : Sun Jan 02 2000 - 11:58:18 MET