General

Profile

sevos (Artur Roszczyk)

Issues

open closed Total
Assigned issues 0 0 0
Reported issues 0 0 0

Activity

02/14/2018

12:52 AM Ruby Feature #13581: Syntax sugar for method reference
cben (Beni Cherniavsky-Paskin) wrote:
> A non-syntax idea: could `Math.method.sqrt` look significantly nicer than `Math.method(:sqrt)`?
> ...
Hey Beni! Thank you! This is a great idea! For my taste it looks significantly better!
Als...
sevos (Artur Roszczyk)

02/06/2018

10:52 AM Ruby Feature #13581: Syntax sugar for method reference
phluid61 (Matthew Kerwin) wrote:
> sevos (Artur Roszczyk) wrote:
> ...
I totally agree, but we still like -> {} syntax for lambdas, right? Let's play with ideas, maybe we can find something nice for a method selector, too ;)
>
> ....
sevos (Artur Roszczyk)
08:19 AM Ruby Feature #13581: Syntax sugar for method reference
After a while I am becoming a bigger fan of the triple colon operator. We could implement a class MethodSelector for handling the logic and the operator would be expected to return an instance of the class:
~~~ruby
class MethodSelect...
sevos (Artur Roszczyk)

02/05/2018

05:39 PM Ruby Feature #13581: Syntax sugar for method reference
Have we ruled out `map(&obj:method)` syntax? Intuitively I find it consistent with `Symbol#to_proc`
~~~ ruby
class Foo
def initialize(array)
@array = array
end
def call
@array
.map(&Math:sqrt)
.map(...
sevos (Artur Roszczyk)

Also available in: Atom