Project

General

Profile

Actions

Feature #16275

closed

Revert `.:` syntax

Added by naruse (Yui NARUSE) about 5 years ago. Updated about 5 years ago.

Status:
Closed
Assignee:
-
Target version:
-
[ruby-core:95502]

Description

obj.:method is introduced at r66667 by #12125 and #13581.
It encourages the functional programming style in Ruby.

But this shorthand syntax is just for methods of self without arguments.
It causes another feature requests like #16273 (and lambda compositions like #15428).

Such features will introduce a new view of Ruby but no one illustrates the whole picture yet.
I worried about such patch work may cause a conflict with future expansion of functional programing style or a just a garbage feature.

.: syntax is introduced in 2.7.0 preview1, not released in production yet.
How about reverting at this time and re-introduce with a big picture.


Files

dot-colon-vs-std-benchmark.png (8.69 KB) dot-colon-vs-std-benchmark.png maciej.mensfeld (Maciej Mensfeld), 11/05/2019 11:39 AM

Related issues 2 (1 open1 closed)

Related to Ruby master - Feature #12125: Proposal: Shorthand operator for Object#methodOpenActions
Related to Ruby master - Feature #13581: Syntax sugar for method referenceClosedActions
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0