From: konsolebox@... Date: 2019-05-28T13:45:31+00:00 Subject: [ruby-core:92877] [Ruby trunk Feature#15799] pipeline operator Issue #15799 has been updated by konsolebox (K B). phluid61 (Matthew Kerwin) wrote: > `a|:b` means `a | :b` and `a=:b` means `a = :b` Yes I implied that a space is necessary for |: or =: to be distinguishable. It's better to have that requirement than have the three-character operator. But I don't mind other better alternatives. To be fair I'm not really a fan of incorporating anything that's coming from the functional world, and I prefer writing explicit code (e.g. prefers parentheses over white space), but I don't mind having these features because I think it would help me write prototype code faster. But not with a three-character operator. Even `|>` is already awkward to type. I can write 86 WPM but I care about efficiency. ---------------------------------------- Feature #15799: pipeline operator https://bugs.ruby-lang.org/issues/15799#change-78256 * Author: nobu (Nobuyoshi Nakada) * Status: Open * Priority: Normal * Assignee: * Target version: ---------------------------------------- Implemented the pipeline operator `|>`, a topic of "ruby committers vs the world" in RubyKaigi 2019. Also a casual idea of rightward assignment. ```ruby 1.. |> take 10 |> map {|x| x*2} |> (x) p x #=> [2, 4, 6, 8, 10, 12, 14, 16, 18, 20] ``` https://github.com/nobu/ruby/tree/feature/pipeline -- https://bugs.ruby-lang.org/ Unsubscribe: