
Flattening Combinators: Surviving Without Parentheses [pdf] - mpweiher
http://www.westpoint.edu/eecs/SiteAssets/SitePages/Faculty%20Publication%20Documents/Okasaki/jfp03flat.pdf
======
eritain
Related to this: Brent Kerby and Billy Tanksley devise flat, two-combinator
bases for Turing-complete concatenative languages. Kerby's is at
[https://groups.yahoo.com/neo/groups/concatenative/conversati...](https://groups.yahoo.com/neo/groups/concatenative/conversations/messages/3194)
and Tanksley's follows a few posts later.

~~~
carapace
Oh cool! This immediately made me think of Joy.

------
yodsanklai
I started to use OCaml again and I noticed that they recently introduced the
operator "|>". It lets you write things like "2 + 3 |> print_int" instead of
"print_int (2 + 3)" or "let x = 2 + 3 in print_int x". It's particularly
convenient for longer nested expressions.

Once you know that trick, it's tempting to use it everywhere and avoid
parenthesis as much as possible. I'm not sure what the accepted practice is
though as it doesn't always improve readability.

I also wonder why it took so long before they introduced it in the language.
It's so simple and convenient. Did it take decades of people writing ML before
someone thought of this?

~~~
profquail
I believe the |> operator has been around for a while -- I've seen it used in
some older Standard ML code, but just as a user-defined operator and not part
of the basis library. F# included it in the core library for the language and
it was fairly popular there for structuring heavily-nested expressions into a
more-human-readable "pipeline". OCaml added it to the Core library fairly
recently, as has (I believe) Elixir.

------
mcguire
TIL Chris Okasaki works for West Point.

------
hderms
Okasaki really is brilliant

------
banach
Delightful!

