Project

General

Profile

Actions

Feature #12240

closed

circle number arguments

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

Status:
Rejected
Assignee:
-
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 1 (0 open1 closed)

Related to Ruby master - Feature #15741: Ordinal parametersRejectedActions

Updated by duerst (Martin Dürst) over 8 years ago

On 2016/04/01 15:10, 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
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
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
Actions #5

Updated by nobu (Nobuyoshi Nakada) over 5 years ago

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

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0Like0