[#97652] [Ruby master Feature#16746] Endless method definition — mame@...

Issue #16746 has been reported by mame (Yusuke Endoh).

24 messages 2020/04/01

[#97655] [Ruby master Misc#16747] Repository reorganization request — shyouhei@...

Issue #16747 has been reported by shyouhei (Shyouhei Urabe).

12 messages 2020/04/01

[#97745] [Ruby master Bug#16769] Struct.new(..., immutable: true) — takashikkbn@...

Issue #16769 has been reported by k0kubun (Takashi Kokubun).

10 messages 2020/04/08

[#97803] [Ruby master Misc#16775] DevelopersMeeting20200514Japan — mame@...

Issue #16775 has been reported by mame (Yusuke Endoh).

20 messages 2020/04/10

[#97810] [Ruby master Bug#16776] Regression in coverage library — deivid.rodriguez@...

Issue #16776 has been reported by deivid (David Rodr刕uez).

11 messages 2020/04/10

[#97828] [Ruby master Misc#16778] Should we stop vendoring default gems code? — deivid.rodriguez@...

Issue #16778 has been reported by deivid (David Rodr刕uez).

37 messages 2020/04/11

[#97878] [Ruby master Feature#16786] Light-weight scheduler for improved concurrency. — samuel@...

Issue #16786 has been reported by ioquatix (Samuel Williams).

72 messages 2020/04/14

[#97893] [Ruby master Bug#16787] [patch] allow Dir.home to work for non-login procs when $HOME not set — salewski@...

Issue #16787 has been reported by salewski (Alan Salewski).

18 messages 2020/04/15

[#97905] [Ruby master Feature#16791] Shortcuts for attributes of Process::Status — 0xfffffff0@...

Issue #16791 has been reported by 0x81000000 (/ /).

10 messages 2020/04/16

[#97907] [Ruby master Bug#16792] Make Mutex held per Fiber instead of per Thread — eregontp@...

Issue #16792 has been reported by Eregon (Benoit Daloze).

9 messages 2020/04/16

[#97989] [Ruby master Misc#16802] Prefer use of RHS assigment in documentation — samuel@...

Issue #16802 has been reported by ioquatix (Samuel Williams).

10 messages 2020/04/21

[#97992] [Ruby master Misc#16803] Discussion: those internal macros reside in public API headers — shyouhei@...

Issue #16803 has been reported by shyouhei (Shyouhei Urabe).

14 messages 2020/04/21

[#98026] [Ruby master Bug#16809] ruby testsuite fails on s390x alpine (musl) with --with-coroutine=copy — ncopa@...

Issue #16809 has been reported by ncopa (Natanael Copa).

11 messages 2020/04/23

[#98034] [Ruby master Feature#16812] Allow slicing arrays with ArithmeticSequence — zverok.offline@...

Issue #16812 has been reported by zverok (Victor Shepelev).

12 messages 2020/04/23

[#98044] [Ruby master Bug#16814] Segmentation fault in GC while running test/ruby/test_fiber.rb on s390x — Rei.Odaira@...

Issue #16814 has been reported by ReiOdaira (Rei Odaira).

14 messages 2020/04/24

[#98059] [Ruby master Bug#16816] Prematurely terminated Enumerator should stay terminated — headius@...

Issue #16816 has been reported by headius (Charles Nutter).

9 messages 2020/04/24

[#98066] [Ruby master Feature#16818] Rename `Range#%` to `Range#/` — sawadatsuyoshi@...

Issue #16818 has been reported by sawa (Tsuyoshi Sawada).

11 messages 2020/04/26

[ruby-core:97929] [Ruby master Feature#16794] Rightward operators

From: shevegen@...
Date: 2020-04-17 02:57:15 UTC
List: ruby-core #97929
Issue #16794 has been updated by shevegen (Robert A. Heiler).


It's an interesting idea. I am not sure if I can easily adjust to the syntax,
but this may be best to just ask matz directly (I think he suggested the
pipeline operator, and streem kind of also taps into that whole handling of
data idea too, so I just think it is best to ask matz what he thinks about it).

One slight concern is that there is a lot of syntax though, and some of
the syntax is a bit hard to read/see - in particular that weird **|> - that
is almost like an ASCII game, like the old animated moon-buggy if anyone 
remembers that "game". :-)

Syntax expression should be considered too, in my opinion (remember
the old perl-inspired variables, which made it difficult to read some of
the perl code and intent behind it, such as e. g. $& $: $. $- $^ ... ok
I made a few up, but you get the idea).

----------------------------------------
Feature #16794: Rightward operators
https://bugs.ruby-lang.org/issues/16794#change-85152

* Author: Dan0042 (Daniel DeLorme)
* Status: Open
* Priority: Normal
----------------------------------------
While reading #15921 (r-assign) and #16670 (reverse pattern matching order) I felt a certain commonality to these and #15799 (pipeline) and I thought maybe there's currently a narrow window of opportunity to adopt an overarching and harmonious syntax for all of these "rightward" operations, rather than ad-hoc syntax for each.

I am **not** suggesting that all of the operators below should be adopted, or implemented at once, or exactly as-is; rather the idea is that the proposals linked above surrounding righward-ness could share elements in order to make them easy to distinguish from previous/existing syntax.

So here go the (wild) ideas:

`=|>`
rightward assignment: `expr =|> var` is equivalent to `var = expr`, also allow `rescue =|> err` for consistency.

`~|>`
rightward destructuring assignment / pattern match: `expr ~|> pattern` is equivalent to `expr in pattern`, just more natural when doing assignment without a pattern match (i.e. no possibiilty of NoMatchingPatternError). And maybe could be allowed as expression/condition?

`|>`
pipe to first argument of right-side method: `expr |> foo(1)` is equivalent to `foo(expr,1)`

`|>>`
pipe to last argument of right-side method: `expr |>> foo(1)` is equivalent to `foo(1,expr)`

`**|>`
pipe hash to keyword arguments of right-side method: `expr **|> foo(1)` is equivalent to `foo(1,**expr)`, ok, I know, crazy idea :-)




-- 
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