[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| From: | William Chesters <williamc@d...> |
| Subject: | Prefix operators in ocaml |
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.