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=-3.6 required=3.0 tests=BAYES_00, FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,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 710D21F731 for ; Sun, 11 Aug 2019 15:12:21 +0000 (UTC) Received: from neon.ruby-lang.org (localhost [IPv6:::1]) by neon.ruby-lang.org (Postfix) with ESMTP id 3E43E120A2F; Mon, 12 Aug 2019 00:12:11 +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 0DEE6120B2A for ; Mon, 12 Aug 2019 00:12:07 +0900 (JST) Received: by filter0145p3mdw1.sendgrid.net with SMTP id filter0145p3mdw1-1555-5D50304A-21 2019-08-11 15:12:10.537896448 +0000 UTC m=+1369356.400053811 Received: from herokuapp.com (unknown [3.84.226.56]) by ismtpd0034p1iad2.sendgrid.net (SG) with ESMTP id gJr4pclMTkS6dWqrikl1Kg for ; Sun, 11 Aug 2019 15:12:10.525 +0000 (UTC) Date: Sun, 11 Aug 2019 15:12:10 +0000 (UTC) From: FreeKMan@protonmail.com Message-ID: References: Mime-Version: 1.0 X-Redmine-MailingListIntegration-Message-Ids: 69821 X-Redmine-Project: ruby-trunk X-Redmine-Issue-Id: 15236 X-Redmine-Issue-Author: ignatiusreza X-Redmine-Sender: D1mon 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?XGrj5q8AsWiWJZahxDQAX5P=2Fup5yurlbC6B1giZxjAQTzLMkpSmiKd2k3RRAmf?= =?us-ascii?Q?qL189BGsIFqDzQdXOnD5x8YFWSmnCJg6c0X8d=2FG?= =?us-ascii?Q?A46kT2jHf07a3t9AtE8MSZGOwr4Pc8v2nCyJ8CX?= =?us-ascii?Q?y3dqLxzdYkg6xdCeHbk0vOftf07=2FGr7t1jfh8PX?= =?us-ascii?Q?AkdXAPLI9lCibqABmdsyh7vgz52uVzSZi+w=3D=3D?= To: ruby-core@ruby-lang.org X-ML-Name: ruby-core X-Mail-Count: 94276 Subject: [ruby-core:94276] [Ruby master Feature#15236] add support for hash shorthand 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 #15236 has been updated by D1mon (Dim F). Well, if the syntax is misleading or intersects with an existing design. Make another syntax to work, why cancel (reject) a very cool thing which will make the code smaller (write less) and it will be nice to read the code. ? Please do not reject the request, redo it and add it to the "ruby core". People have been asking for this opportunity for several years now, please do not refuse them. Thank. ---------------------------------------- Feature #15236: add support for hash shorthand https://bugs.ruby-lang.org/issues/15236#change-80599 * Author: ignatiusreza (Ignatius Reza Lesmana) * Status: Rejected * Priority: Normal * Assignee: * Target version: ---------------------------------------- PR in github: https://github.com/ruby/ruby/pull/1990 inspired by javascript support for object literal shorthand notation `{ a }`, which will be expanded into `{ a: a }`.. to avoid ambiguity, this shorthand is only supported when hash is defined with `{ }` notation.. in other situation where the brackets is optional, e.g. function call, we still need to write it in full (`m(a : a)` instead of `m(a)`, or `m(a, b, c: c)` instead of `m(a, b, c)`.. -- https://bugs.ruby-lang.org/