From: William Chesters <williamc@dai.ed.ac.uk>
To: caml-list@inria.fr
Subject: Prefix operators in ocaml
Date: Thu, 21 Jan 1999 15:47:14 GMT [thread overview]
Message-ID: <199901211547.PAA01429@toy.william.bogus> (raw)
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.
next prev parent reply other threads:[~1999-01-21 18:26 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
1999-01-21 14:42 Eduardo Gimenez
1999-01-21 15:47 ` William Chesters [this message]
1999-01-21 16:04 ` Chris Keane
1999-01-21 16:13 ` Jun P. Furuse
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=199901211547.PAA01429@toy.william.bogus \
--to=williamc@dai.ed.ac.uk \
--cc=caml-list@inria.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox