From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS4713 221.184.0.0/13 X-Spam-Status: No, score=-4.1 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from neon.ruby-lang.org (neon.ruby-lang.org [221.186.184.75]) by dcvr.yhbt.net (Postfix) with ESMTP id 3D1261F462 for ; Sat, 25 May 2019 01:28:42 +0000 (UTC) Received: from neon.ruby-lang.org (localhost [IPv6:::1]) by neon.ruby-lang.org (Postfix) with ESMTP id 5A9DF120B6B; Sat, 25 May 2019 10:28:36 +0900 (JST) Received: from o1678916x28.outbound-mail.sendgrid.net (o1678916x28.outbound-mail.sendgrid.net [167.89.16.28]) by neon.ruby-lang.org (Postfix) with ESMTPS id CF552120B67 for ; Sat, 25 May 2019 10:28:34 +0900 (JST) Received: by filter0145p3mdw1.sendgrid.net with SMTP id filter0145p3mdw1-9209-5CE89A43-15 2019-05-25 01:28:35.551985823 +0000 UTC m=+116723.617859061 Received: from herokuapp.com (unknown [35.175.245.114]) by ismtpd0017p1iad2.sendgrid.net (SG) with ESMTP id xoj9jDGGRzq6ffz10CY0XQ for ; Sat, 25 May 2019 01:28:35.445 +0000 (UTC) Date: Sat, 25 May 2019 01:28:35 +0000 (UTC) From: merch-redmine@jeremyevans.net Message-ID: References: Mime-Version: 1.0 X-Redmine-MailingListIntegration-Message-Ids: 68321 X-Redmine-Project: ruby-trunk X-Redmine-Issue-Id: 15799 X-Redmine-Issue-Author: nobu X-Redmine-Sender: jeremyevans0 X-Mailer: Redmine X-Redmine-Host: bugs.ruby-lang.org X-Redmine-Site: Ruby Issue Tracking System X-Auto-Response-Suppress: All Auto-Submitted: auto-generated X-SG-EID: =?us-ascii?Q?RVE3t853K5scBhbmJHUzZTFFeVC=2FZSUmHZ0Dc+26wcEi2CTgsF1oz0wTSSxGGN?= =?us-ascii?Q?BIhpMugkQFeUbfXRtnbytqDGa2VZnfE=2Fr4SqPE6?= =?us-ascii?Q?i7OYNSAEpdhw+BNNhWoLXp92P1xB=2FxqRxzewfEj?= =?us-ascii?Q?8H7iX3O=2Fcj6EB+Vm6MHUCast1Hxnfy0LsNToLPC?= =?us-ascii?Q?l2ZSeSXVBGahQMMjaQ7ol5AB8+8zjvHaADA=3D=3D?= To: ruby-core@ruby-lang.org X-ML-Name: ruby-core X-Mail-Count: 92838 Subject: [ruby-core:92838] [Ruby trunk Feature#15799] pipeline operator X-BeenThere: ruby-core@ruby-lang.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: Ruby developers List-Id: Ruby developers List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ruby-core-bounces@ruby-lang.org Sender: "ruby-core" Issue #15799 has been updated by jeremyevans0 (Jeremy Evans). I think a pipeline operator can be helpful in a functional language, based on my experience with `$` in Haskell. However, I don't think it is a good idea to implement a replacement for the `.` operator just to avoid parentheses. If it has different semantics, maybe it could be useful, but it would depend on what those semantics are. Because Ruby uses methods instead of functions, I'm not sure what semantics we would want from a pipeline operator. ---------------------------------------- Feature #15799: pipeline operator https://bugs.ruby-lang.org/issues/15799#change-78217 * 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/