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=-2.6 required=3.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, FORGED_GMAIL_RCVD,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS shortcircuit=no autolearn=no 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 BB07C1F462 for ; Thu, 13 Jun 2019 10:01:22 +0000 (UTC) Received: from neon.ruby-lang.org (localhost [IPv6:::1]) by neon.ruby-lang.org (Postfix) with ESMTP id 6B6A8120B32; Thu, 13 Jun 2019 19:01:16 +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 CF8EB120AC3 for ; Thu, 13 Jun 2019 19:01:13 +0900 (JST) Received: by filter0078p3iad2.sendgrid.net with SMTP id filter0078p3iad2-26576-5D021ED3-73 2019-06-13 10:00:51.780018535 +0000 UTC m=+753251.663909563 Received: from herokuapp.com (unknown [52.207.231.138]) by ismtpd0019p1iad2.sendgrid.net (SG) with ESMTP id Yk2cwxAGTNmRCl2R6U6v0w for ; Thu, 13 Jun 2019 10:00:51.751 +0000 (UTC) Date: Thu, 13 Jun 2019 10:00:52 +0000 (UTC) From: eregontp@gmail.com Message-ID: References: Mime-Version: 1.0 X-Redmine-MailingListIntegration-Message-Ids: 68589 X-Redmine-Project: ruby-trunk X-Redmine-Issue-Id: 15799 X-Redmine-Issue-Author: nobu X-Redmine-Sender: Eregon 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?KippOI8ZHtTweq7XfQzW93937kJ4QNWwSBuHnaMEcr2hwBzr=2FB6C4Dk=2FrVXDiT?= =?us-ascii?Q?eYLasuFS4QBRoub2RD72JNx9bUvUBEGws4NLakj?= =?us-ascii?Q?8iMl+20Vmvg9snrSnls887u5FyRRBNQ7cIFh2Vk?= =?us-ascii?Q?gydEf0VYRzTA0ZMXg5xHiH4iZmInVUtPlQTrz38?= =?us-ascii?Q?768laGPW8B56=2FFM39hqq4zlRR2SD0VlAUkA=3D=3D?= To: ruby-core@ruby-lang.org X-ML-Name: ruby-core X-Mail-Count: 93103 Subject: [ruby-core:93103] [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 Eregon (Benoit Daloze). Why was this accepted? I cannot see anyone really supporting this idea in this issue's comments. As everyone said, it hurts readability, looks like Haskell, and there seems to be really no need for a different syntax for methods calls. The example in the commit seems very unconvincing to me: ```ruby # today x = (12 ** 2).to_s(11) # the new syntax x = 12 |> pow(2) |> to_s(11) ``` It's even much longer. ---------------------------------------- Feature #15799: pipeline operator https://bugs.ruby-lang.org/issues/15799#change-78527 * Author: nobu (Nobuyoshi Nakada) * Status: Closed * 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 {|e| e*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/