Date: Thu, 21 Jan 1999 15:47:14 GMT
From: William Chesters <firstname.lastname@example.org>
Subject: Prefix operators in ocaml
Eduardo Gimenez writes:
> 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"
> 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
This archive was generated by hypermail 2b29 : Sun Jan 02 2000 - 11:58:18 MET