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.8 required=3.0 tests=AWL,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 CE6B21F4C0 for ; Tue, 15 Oct 2019 15:53:09 +0000 (UTC) Received: from neon.ruby-lang.org (localhost [IPv6:::1]) by neon.ruby-lang.org (Postfix) with ESMTP id BB79D120A14; Wed, 16 Oct 2019 00:53:00 +0900 (JST) Received: from xtrwkhkc.outbound-mail.sendgrid.net (xtrwkhkc.outbound-mail.sendgrid.net [167.89.16.28]) by neon.ruby-lang.org (Postfix) with ESMTPS id CE01F120A13 for ; Wed, 16 Oct 2019 00:52:58 +0900 (JST) Received: by filter0077p3las1.sendgrid.net with SMTP id filter0077p3las1-24252-5DA5EB5D-33 2019-10-15 15:53:01.355384911 +0000 UTC m=+341693.297808009 Received: from herokuapp.com (unknown [52.91.31.13]) by ismtpd0049p1mdw1.sendgrid.net (SG) with ESMTP id LuUmJkukQXS6Du2Fs88OHA for ; Tue, 15 Oct 2019 15:53:00.980 +0000 (UTC) Date: Tue, 15 Oct 2019 15:53:01 +0000 (UTC) From: eregontp@gmail.com Message-ID: References: Mime-Version: 1.0 X-Redmine-MailingListIntegration-Message-Ids: 70928 X-Redmine-Project: ruby-trunk X-Redmine-Issue-Id: 16253 X-Redmine-Issue-Author: Dan0042 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?KippOI8ZHtTweq7XfQzW93937kJ4QNWwSBuHnaMEcr0zXqF1DW59XiAqGCC6kj?= =?us-ascii?Q?C=2FR=2F=2FOsM956jAKNd0FNEnAwMorU3CHgf0zkyRGa?= =?us-ascii?Q?7txm=2F6EpLbh0pJeckLy=2FTRm7VQkuLCoRgAP3qIp?= =?us-ascii?Q?MrprTob2Lm2pZXXOG=2FYvhxJ7zX+kdWgHaKhsm5J?= =?us-ascii?Q?ESpcLcWLdjr7HAWO=2FhI9sfkWMaAtDvytBIw=3D=3D?= To: ruby-core@ruby-lang.org X-ML-Name: ruby-core X-Mail-Count: 95340 Subject: [ruby-core:95340] [Ruby master Feature#16253] Shorthand "forward everything" syntax 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 #16253 has been updated by Eregon (Benoit Daloze). `...` has been proposed a few times as well, I'm not sure if there is a ticket for it: ```ruby def foo(...) @bar.foo(...) ``` ---------------------------------------- Feature #16253: Shorthand "forward everything" syntax https://bugs.ruby-lang.org/issues/16253#change-82049 * Author: Dan0042 (Daniel DeLorme) * Status: Open * Priority: Normal * Assignee: * Target version: ---------------------------------------- What about using this: ```ruby def foo(*) @bar.foo(*) ``` to mean this: ```ruby def foo(*a, **o, &b) @bar.foo(*a, **o, &b) ``` I used `def foo(*)` because that's currently valid ruby code, but I'm fine with any syntax. It's like the no-parentheses `super` shorthand, but for any method. It makes it easier to write correct forwarding code. If rubyists must be told they have to change their forwarding code in 2.7 (due to keyword arguments), the pill might be easier to swallow if the change is a reduction rather than an increase in verbosity. And we'd even be future-proof if an eventual FOURTH kind of parameter is introduced!!!! -- https://bugs.ruby-lang.org/