Hacker News new | ask | show | jobs
by f6v 2018 days ago
Better late than never, but dplyr solved the pipe problem long time ago.
3 comments

There is a big difference between what is allowed from within a package and what is possible in native implementation. As an example - currently this pipe operator seems to be implemented at the parser level. The parser simply takes the pipe expression and translates it into standard nested function call f(g(x)). Which means - there will be almost no cost in speed (%>% was notoriously slow). In addition the user will get the usual error stack in case something within this pipe fails.
i’m new to R but I really prefer the |> to %>%

Much better to use the OCaml, F# syntax.

Think Julia uses it too.

Agreed but |> instead of %>% is certainly easier to type! I’ll be interested in trying it out at least