Project

General

Profile

Feature #12240

circle number arguments

Added by nobu (Nobuyoshi Nakada) over 3 years ago. Updated 5 months ago.

Status:
Rejected
Priority:
Normal
Assignee:
joke
Target version:
-
[ruby-core:74761]

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


Related issues

Related to Ruby master - Feature #15741: Ordinal parametersRejectedActions

History

Updated by duerst (Martin Dürst) over 3 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 3 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 3 years ago

  • Assignee set to joke

Updated by nobu (Nobuyoshi Nakada) over 3 years ago

  • Status changed from Open to Rejected
#5

Updated by nobu (Nobuyoshi Nakada) 5 months ago

Updated by nobu (Nobuyoshi Nakada) 5 months ago

As now we have @1 and so on, revised and refined this patch.
https://github.com/nobu/ruby/pull/new/feature/circled_numparams

Also available in: Atom PDF