[#89430] [Ruby trunk Misc#15229] DevelopersMeeting201801122Japan — mame@...
Issue #15229 has been reported by mame (Yusuke Endoh).
3 messages
2018/10/17
[#89555] [Ruby trunk Feature#15251] Hash aset should deduplicate non tainted string — chopraanmol1@...
Issue #15251 has been updated by chopraanmol1 (Anmol Chopra).
3 messages
2018/10/25
[#89583] [PATCH] vm_trace.c (postponed_job_register): only hit main thread — Eric Wong <normalperson@...>
@hsbt: I post here on ruby-core because I hit errors with
5 messages
2018/10/27
[#89584] Re: [PATCH] vm_trace.c (postponed_job_register): only hit main thread
— Koichi Sasada <ko1@...>
2018/10/27
thank you for you patch.
[#89590] Re: [PATCH] vm_trace.c (postponed_job_register): only hit main thread
— Eric Wong <normalperson@...>
2018/10/28
Koichi Sasada <[email protected]> wrote:
[#89621] [Ruby trunk Bug#14867] Process.wait can wait for MJIT compiler process — Greg.mpls@...
Issue #14867 has been updated by MSP-Greg (Greg L).
4 messages
2018/10/29
[#89622] Re: [Ruby trunk Bug#14867] Process.wait can wait for MJIT compiler process
— Eric Wong <normalperson@...>
2018/10/29
[email protected] wrote:
[#89627] [Ruby trunk Bug#14867] Process.wait can wait for MJIT compiler process — takashikkbn@...
Issue #14867 has been updated by k0kubun (Takashi Kokubun).
3 messages
2018/10/30
[#89654] [Ruby trunk Bug#14867] Process.wait can wait for MJIT compiler process — takashikkbn@...
Issue #14867 has been updated by k0kubun (Takashi Kokubun).
4 messages
2018/10/31
[#89655] Re: [Ruby trunk Bug#14867] Process.wait can wait for MJIT compiler process
— Eric Wong <normalperson@...>
2018/10/31
[email protected] wrote:
[ruby-core:89475] [Ruby trunk Feature#15236] add support for hash shorthand
From:
shevegen@...
Date:
2018-10-19 14:13:24 UTC
List:
ruby-core #89475
Issue #15236 has been updated by shevegen (Robert A. Heiler).
Hmm. It's hard for me to say whether I am in favour of this suggestion or
whether I am not.
I think this link may help a bit in regards to JavaScript, even though
JavaScript is not Ruby; neither is the syntax:
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Object_initializer
Old JavaScript variant:
var o = {};
var o = {a: 'foo', b: 42, c: {}};
versus New JavaScript variant:
var a = 'foo', b = 42, c = {};
var o = {a, b, c};
I understand the second part being more convenient and more concise. I am not
really sure whether it makes sense for ruby to adopt this, though.
The part where "omission means something more", is sometimes confusing.
I myself got used to be able to omit {} in a method definition, such as
your example:
m(a, b, c: c)
which I think would be this:
m(a, b, { c: c })
I also use the somewhat new Hash syntax in ruby a lot, like:
foo: :bar
versus the old variant (but still the "real" variant)
:foo => :bar
I am not entirely sure about the new omission-meaning-infinity
in ranges ( 1 .. ) either, or { a } meaning { a: a } like in the
proposal here, where a is a variable that must exist already,
if { a } is to work. This also reminds me a bit about the
shortcut suggestion for initializing instance variables within
the method-argument, rather than the body of the method at
hand (usually "def initialize").
I don't really have a definite pro or con view but I think it
should be thought through for some time either way. While experienced
ruby developers have it easy learning new syntax parts, newcomers may
have to gradually learn more and more syntax parts, which may not be
ideal for them, even if the new syntax may be shorter. Or where the
syntax allows us to do more with {}, rather than with Hash.new - that
should also be considered to evaluate all trade-offs and
advantages/disadvantages.
If you would like to, you could add your suggestion to any upcoming
developer meeting where you could get some opinions from the ruby core
team and of course matz (which would be at
https://bugs.ruby-lang.org/issues/15229 for the next one in November
2018; or perhaps for a later one in January 2019 since I assume
most energy of the team may go into the upcoming x-mas release of
ruby :) ).
----------------------------------------
Feature #15236: add support for hash shorthand
https://bugs.ruby-lang.org/issues/15236#change-74516
* Author: ignatiusreza (Ignatius Reza Lesmana)
* Status: Open
* 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/
Unsubscribe: <mailto:[email protected]?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>