On Fri, 8 Oct 1999, Hamilton Richards Jr. wrote:
>
> At 1:01 PM -0500 10/8/1999, [EMAIL PROTECTED] wrote:
> >
> >Some time ago there was a discussion about what to call reverse
> >composition (I can't find it in the archive - needs a search option?)
> >
> >Just now I thought of .~ from . for composition and ~ (tilde, but
> >commonly called twiddle) for twiddling the order about.
> >
> >Maybe we could adopt that as normal usage?
>
> Assuming that "reverse composition" means
>
> f .~ g = g . f
>
> I kind of like >.> ("forward composition"), which I first saw in Simon
> Thompson's book.
Discussion of what glyph(s) to use for the reverse composition operator
just reminded me of the fact that you might really want to think up
a new "forward" composition operator, as well. Twice in the past few
months I've seen the suggestion that "." really should be used for
what the vast majority of programming languages already use it for,
namely, a part of the record syntax. If you look at the code
examples in the "Lightweight extensible records" paper:
http://research.microsoft.com/Users/simonpj/#records
or those in the O'Haskell work:
http://www.cs.chalmers.se/~nordland/ohaskell/index.html
I think you might see the point. (No pun back there, I promise...) I
understand where using "." to mean composition came from, and I know that
it's a long-standing tradition in at least the Haskell community, but I
don't think the visual correspondence of . to the typographic glyph
"raised open circle" is so close that you'd really like to explain why
you diverged from current usage so much as to choose "." to mean
"composition". Especially since to "reverse" it, you end up using >.>
> It makes pipelines easy to read:
>
> f >.> g >.> h >.> ...
How about:
f |> g |> h |> ...
for the above, and
g <| f
for "normal" composition? (Or does this step on some other notation out
there already?) You save a character, get a nice, reversible glyph, and
get to make a different point somewhere else.
jking