Issue #16939 has been updated by shevegen (Robert A. Heiler).


I like to use _. I can see one benefit of your suggestion being that it is slightly 
shorter. I am mostly neutral on the suggestion but perhaps leaning towards a bit in
favour (I have not thought it through fully yet though). [I guess it comes down to
which identifier to use in an implicit manner, be it _ or anything else.]

----------------------------------------
Feature #16939: Alias _1 as _ for block numbered params
https://bugs.ruby-lang.org/issues/16939#change-86027

* Author: x3qt (Yury Polyakov)
* Status: Open
* Priority: Normal
----------------------------------------
I propose to alias `_1` as `_` for block numbered params, so the following statements should be equal 
``` ruby
[1,2,3].map { _1 ** 2 }

[1,2,3].map { _ ** 2 }
```
There is an [anonymous function argument literal](https://clojure.org/reference/reader#_dispatch) in Clojure and it feels natural all the way, hope we can have the one too.



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