[#92070] [Ruby trunk Feature#15667] Introduce malloc_trim(0) in full gc cycles — sam.saffron@...
Issue #15667 has been updated by sam.saffron (Sam Saffron).
3 messages
2019/04/01
[ruby-core:92436] [Ruby trunk Feature#15799] pipeline operator
From:
eregontp@...
Date:
2019-04-27 13:23:05 UTC
List:
ruby-core #92436
Issue #15799 has been updated by Eregon (Benoit Daloze).
My early thinking about this syntax is it's a very narrow use-case.
Is it anything more than `.` and no need for parentheses in some rare cases?
There is also the RHS assignment which feels very unnatural to me.
I think there is nothing wrong with having parentheses for Range, I think they actually help readability.
Martin's desugared version which works today is actually shorter and I believe most would agree it's also clearer.
To be fair, I don't particularly like Haskell code and find it very cryptic, which this is getting closer to.
Also, if we actually introduce a pipeline operator, I think it's much more useful to have Elixir semantics of passing the result as the first argument of the RHS, than just a different syntax for `.`.
----------------------------------------
Feature #15799: pipeline operator
https://bugs.ruby-lang.org/issues/15799#change-77790
* Author: nobu (Nobuyoshi Nakada)
* Status: Open
* Priority: Normal
* Assignee:
* Target version:
----------------------------------------
Implemented the pipeline operator `|>`, a topic of "ruby committers vs the world" in RubyKaigi 2019.
Also a casual idea of rightward assignment.
```ruby
1.. |> take 10 |> map {|x| x*2} |> (x)
p x #=> [2, 4, 6, 8, 10, 12, 14, 16, 18, 20]
```
https://github.com/nobu/ruby/tree/feature/pipeline
--
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>