caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Jon Harrop <jon@ffconsultancy.com>
To: caml-list@yquem.inria.fr
Subject: Re: [Caml-list] Having '<<', why to use '|>' ?
Date: Tue, 18 Sep 2007 17:42:27 +0100	[thread overview]
Message-ID: <200709181742.27747.jon@ffconsultancy.com> (raw)
In-Reply-To: <20070918161246.1ff37e29@localhost.localdomain>

On Tuesday 18 September 2007 15:12:46 Fabrice Marchant wrote:
> A 3 chars operator (<<<) doesn't look smart.

That is actually the F# for lsl. There are also ||| and &&& for bitwise ops.

> Simpler is better. 
> However, about (@@), I preferred to see the direction of the asymmetric
> composition operator. ( <| ) instead of ( << ) ? Is this a possible idea ?

But "<<" is the converse of ">>" (in F#) and "|>" has no converse (or you 
could say that "x |> f" is the converse of "f x").

>   But maybe your idea is good. Maths use a kind of small 'o' : (f o g) (x)
> = f (g (x)). It's symmetric like (@@), and that doesn't raise any problem.

If an OCaml front-end handled unicode with appropriate symbol settings then 
you could use an "o" symbol to mean that infix operator. I think that is a 
good solution, provided you use an editor that supports suitable unicode and 
there is an easy way to enter such things.

-- 
Dr Jon D Harrop, Flying Frog Consultancy Ltd.
OCaml for Scientists
http://www.ffconsultancy.com/products/ocaml_for_scientists/?e


  reply	other threads:[~2007-09-18 20:12 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-09-17 14:36 Fabrice Marchant
2007-09-17 18:59 ` [Caml-list] " Eric Cooper
2007-09-17 19:45   ` Fabrice Marchant
2007-09-17 22:24 ` Julien Moutinho
2007-09-18  5:39   ` Fabrice Marchant
2007-09-18  8:53     ` Julien Moutinho
2007-09-18  9:09       ` Julien Moutinho
2007-09-18 14:12       ` Fabrice Marchant
2007-09-18 16:42         ` Jon Harrop [this message]
2007-09-18 20:41           ` skaller
2007-09-19 19:49           ` Fabrice Marchant
2007-09-19 21:56             ` Vincent Aravantinos
2007-09-20 13:42             ` Ashish Agarwal
2007-09-20 18:37               ` Gabriel Kerneis
2007-09-21 20:58               ` Harrison, John R
2007-09-21 21:44                 ` Karl Zilles
2007-09-20 14:39 Aaron Bohannon
2007-09-22 15:22 ` Nicolas Pouillard
2007-09-22 15:43   ` Daniel Bünzli
2007-09-22 23:55     ` Christian Stork

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=200709181742.27747.jon@ffconsultancy.com \
    --to=jon@ffconsultancy.com \
    --cc=caml-list@yquem.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;
as well as URLs for NNTP newsgroup(s).