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 CEBCC1F4C0 for ; Tue, 22 Oct 2019 19:38:00 +0000 (UTC) Received: from neon.ruby-lang.org (localhost [IPv6:::1]) by neon.ruby-lang.org (Postfix) with ESMTP id A7477120A3A; Wed, 23 Oct 2019 04:37:51 +0900 (JST) Received: from o1678948x4.outbound-mail.sendgrid.net (o1678948x4.outbound-mail.sendgrid.net [167.89.48.4]) by neon.ruby-lang.org (Postfix) with ESMTPS id 8BE52120A39 for ; Wed, 23 Oct 2019 04:37:49 +0900 (JST) Received: by filter0090p3mdw1.sendgrid.net with SMTP id filter0090p3mdw1-9773-5DAF5A8F-3 2019-10-22 19:37:51.030519597 +0000 UTC m=+75849.486930893 Received: from herokuapp.com (unknown [54.175.237.173]) by ismtpd0075p1mdw1.sendgrid.net (SG) with ESMTP id -Dh1jy6IRG2Eu3e0tJc-jw for ; Tue, 22 Oct 2019 19:37:51.008 +0000 (UTC) Date: Tue, 22 Oct 2019 19:37:51 +0000 (UTC) From: keystonelemur@gmail.com Message-ID: References: Mime-Version: 1.0 X-Redmine-MailingListIntegration-Message-Ids: 71070 X-Redmine-Project: ruby-trunk X-Redmine-Issue-Id: 16253 X-Redmine-Issue-Author: Dan0042 X-Redmine-Sender: baweaver 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?XlD0LGPYDDjb=2FA1CQKGKXgvLTTlhHMIrQD1g5Sx7EbIrAdlTUI=2FsQKeO+wRMXk?= =?us-ascii?Q?H5uimygK383+cDdDyQ7QvOjsl6bd4zpwfx+pQsh?= =?us-ascii?Q?QxEoh4ms5e6HIPCFsws8czcv8CDtCLSpKSzCllJ?= =?us-ascii?Q?Z=2FwIUOE962h5y531n4G5YSe=2Ft4K=2F2DWhlYznEQx?= =?us-ascii?Q?9sdEf8eu8eDQVUI=2FBGjIIroWg=2FjcA7XUS5w=3D=3D?= To: ruby-core@ruby-lang.org X-ML-Name: ruby-core X-Mail-Count: 95478 Subject: [ruby-core:95478] [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 baweaver (Brandon Weaver). Going to do a writeup on this later tonight if anyone wants to proof-read it, it'll be interesting to see what the wider community thinks but I really like it. Also really loving the attention to detail Jeremy's been giving lately, really helps to clear up details. ---------------------------------------- Feature #16253: Shorthand "forward everything" syntax https://bugs.ruby-lang.org/issues/16253#change-82248 * Author: Dan0042 (Daniel DeLorme) * Status: Closed * 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/