caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Brian Hurt <bhurt@janestcapital.com>
To: Sam Steingold <sds@gnu.org>
Cc: caml-list@inria.fr
Subject: Re: [Caml-list] List.cons and "::"
Date: Tue, 17 Jul 2007 16:15:26 -0400	[thread overview]
Message-ID: <469D235E.9000008@janestcapital.com> (raw)
In-Reply-To: <469D2055.5080408@gnu.org>

Sam Steingold wrote:

>-----BEGIN PGP SIGNED MESSAGE-----
>Hash: SHA1
>
>Why is :: a syntax, not an infix version of List.cons
>(which for some reason is missing)?
>thanks.
>  
>

So it can be used in pattern matching.  Things used in pattern matching 
the compiler has to know about, and thus the user can't override.  
Things not used in pattern matching can be overridden.  So you can 
redefine + if you wanted to.  I wouldn't recommend it, but you could.  
:: and , you can't override.

Brian


  reply	other threads:[~2007-07-17 20:15 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-07-17 20:02 Sam Steingold
2007-07-17 20:15 ` Brian Hurt [this message]
2007-07-17 20:38   ` [Caml-list] " Martin Jambon
2007-07-17 22:02     ` code17
2007-07-17 20:46   ` [Caml-list] " Chris King
2007-07-18 21:36     ` Pierre Etchemaïté
2007-07-17 22:33 ` Jon Harrop

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=469D235E.9000008@janestcapital.com \
    --to=bhurt@janestcapital.com \
    --cc=caml-list@inria.fr \
    --cc=sds@gnu.org \
    /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;
as well as URLs for NNTP newsgroup(s).