top | item 43036240

(no title)

_huayra_ | 1 year ago

Many such things from F# come from Haskell (given the influence from MSR UK, specifically Simon Peyton Jones before he left a few years ago), so likely Haskell or earlier imo (at least in terms of "complex" "pipe" operations that have higher-level operations than "bytes in, bytes out" of Unix).

discuss

order

ubertaco|1 year ago

Worth noting that F# started out life as an implementation of OCaml for the .NET runtime [1], so most likely the pipe syntax was taken from there, although the pipeline-of-functions construction is much older than that [2]

[1] https://softwareengineering.stackexchange.com/questions/2099...

[2] https://retrocomputing.stackexchange.com/questions/17335/wha...

grndn|1 year ago

OCaml took the '|>' pipe symbol from F#. And F# was the language that made the '|>' pipe symbol popular in mainstream programming (as opposed to the unix '|' pipe symbol), afaik. According to Don Syme, it was used in F# in 2003 (see "Early History of F#", section 9.1, [1] which references [2]).

Here's his full comment:

/quote

Despite being heavily associated with F#, the use of the pipeline symbol in ML dialects actually originates from Tobias Nipkow, in May 1994 (with obvious semiotic inspiration from UNIX pipes) [archives 1994; Syme 2011].

... I promised to dig into my old mail folders to uncover the true story behind |> in Isabelle/ML, which also turned out popular in F#...

In the attachment you find the original mail thread of the three of us [ Larry Paulson; Tobias Nipkow; Marius Wenzel], coming up with this now indispensable piece of ML art in April/May 1994. The mail exchange starts as a response of Larry to my changes.

...Tobias ...came up with the actual name |> in the end...

/endquote

Haskell has had "$" or "backwards pipe" for ages, but that is just another way of doing function application and it does not feel the same as (and is not used the same way as) the unix-style piping paradigm.

[1] https://fsharp.org/history/hopl-final/hopl-fsharp.pdf

[2] https://web.archive.org/web/20190217164203/https://blogs.msd...