[#81492] [Ruby trunk Feature#13618] [PATCH] auto fiber schedule for rb_wait_for_single_fd and rb_waitpid — normalperson@...

Issue #13618 has been reported by normalperson (Eric Wong).

12 messages 2017/06/01

[ruby-core:81727] [Ruby trunk Feature#11105] ES6-like hash literals

From: tleish@...
Date: 2017-06-19 22:32:22 UTC
List: ruby-core #81727
Issue #11105 has been updated by tleish (Tony Fenleish).


+1

While it might be odd or new for some, using this in ES6 has been very nice.  I am often wishing this was supported in Ruby.  The cognitive load is so much nicer and less redundant.

I wish it could be reconsidered.

----------------------------------------
Feature #11105: ES6-like hash literals
https://bugs.ruby-lang.org/issues/11105#change-65427

* Author: shugo (Shugo Maeda)
* Status: Rejected
* Priority: Normal
* Assignee: 
* Target version: 
----------------------------------------
Why not support ECMAScript6-like hash literals?

For example,

    {x, y}

is equivalent to:

    {x: x, y: y}

For convenience, the prefix of global, instance, and class variables should be removed from the key name as follows:

    a = 1
    B = 2
    $c = 3
    @d = 4
    @@e = 5
    p({a, B, $c, @d, @@e, f: 6})
    #=> {:a=>1, :B=>2, :c=>3, :d=>4, :e=>5, :f=>6}


---Files--------------------------------
0001-support-ES6-like-hash-literals.patch (3.88 KB)


-- 
https://bugs.ruby-lang.org/

Unsubscribe: <mailto:ruby-core-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>

In This Thread

Prev Next