Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
Re: [Caml-list] why is the forward pipe operator (>|) so little used?
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2010-10-03 (14:15)
From: Thomas.Gazagnaire@i...
Subject: Re: [Caml-list] why is the forward pipe operator (>|) so little used?
I believe it is considered as good practice in F# to use the forward type
operator, only because of visual-studio "intellisense", ie. tab completion
using types information available at write-time.

So suppose you a variable x already typed in your environment, if you write :
$ x |> map (fun elt -> elt.
at this point visual studio can infer the type of elt and show to the
programmer which 'methods' he can call on it.

if you do the normal way, you can't infer the type of elt at write-time.
imho, the impact on style and readability is only a fortunate side-effect


> hi
> Reading a few introduction F# articles and presentations I made the
> observation that the forward pipe operator is widely popular. Its also
> a language feature that, when it comes  up on blogposts or on
> stackoverflow, its  presented as a special F# feature.
> In the Ocaml world the pipe doesn't have a special place. I doesn't
> come up in any of the Ocaml Books (print or pdf) and hardly any
> internet articles or blog posts. For example Jon Harrop mentions the
> pipe in one of his F# books but not in the Ocaml for Scientists book.
> Looking at the mentioned F# code, I think the usage of the pipe has an
> ( imho positive) impact on the style and the readability of the code.
> But obviously the proficient Ocaml folks don't use it - could someone
> may explain the reason(s)?
> thanks
> ben
> _______________________________________________
> Caml-list mailing list. Subscription management:
> Archives:
> Beginner's list:
> Bug reports: