Feature #12240
closedcircle number arguments
Description
Often improvements about implicit block argument have been proposed, but in vain.
Such as:
[[1, 2], [3, 4]].map {|a1, a2| a1+a2} #=> [3, 7]
to
[[1, 2], [3, 4]].map {_1+_2}
Now, we (ko1 and nobu) found and propose the perfect solution.
[[1, 2], [3, 4]].map {①+②}
①
..⑳
denote the arguments upto 20.
https://github.com/ruby/ruby/compare/trunk...nobu:feature/number-arg
Updated by duerst (Martin Dürst) over 8 years ago
On 2016/04/01 15:10, nobu@ruby-lang.org wrote:
[[1, 2], [3, 4]].map {①+②}
①
..⑳
denote the arguments upto 20.
I admire your modesty. Unicode's circled numbers go up to 50 (see
http://www.unicode.org/charts/PDF/U3200.pdf), which should take care of
even the most complicated blocks.
In addition, there are two series of circled black numbers with white
background (serif and sans-serif), although only up to 10. Then we have
also two series of circled white numbers with black backgrounds, one up
to 10 and the other up to 20. And then there are also double-circled
numbers (up to 10). I'm sure we can find some good uses for these series!
In addition, a proposal for adding black and white circled numbers
possibly up into the 200s was recently discussed on the
unicode@unicode.org mailing list (see
http://www.unicode.org/mail-arch/unicode-ml/y2016-m03/0022.html and
followups), for use in Go (囲碁) diagrams. If such a proposal gets
accepted, there's even less chance of running out of numbers for
implicit arguments :-).
Regards, Martin.
Updated by nobu (Nobuyoshi Nakada) over 8 years ago
Martin Dürst wrote:
In addition, a proposal for adding black and white circled numbers
possibly up into the 200s was recently discussed on the
unicode@unicode.org mailing list (see
http://www.unicode.org/mail-arch/unicode-ml/y2016-m03/0022.html and
followups), for use in Go (囲碁) diagrams. If such a proposal gets
accepted, there's even less chance of running out of numbers for
implicit arguments :-).
HOLY UNICODE!!
Updated by usa (Usaku NAKAMURA) over 8 years ago
- Assignee set to 10790
Updated by nobu (Nobuyoshi Nakada) over 8 years ago
- Status changed from Open to Rejected
Updated by nobu (Nobuyoshi Nakada) over 5 years ago
- Related to Feature #15741: Ordinal parameters added
Updated by nobu (Nobuyoshi Nakada) over 5 years ago
As now we have @1
and so on, revised and refined this patch.
https://github.com/nobu/ruby/pull/new/feature/circled_numparams