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


Personally what I dislike about .: is mostly that I have to look carefully at the code
and think.

> It is not just for °»the functional programming style°….
> Originally it was to extract the exact method even if obj.method was overridden.

I think that the idea behind .: is ok but syntax-wise I am not sure if it is good
to have it in that way. Naruse actually made another point, though, even if the
other statement was not entirely correct, in the sense that he referred to proposals
that may be in conflict/competition with the syntax - see zverok's suggestion for
e. g. &.: or something like that; and I am not quite liking the ideas that spawn off
from other prior ideas here, simply syntax-wise alone. Even though that may be 
subjective due to a personal evaluation (as style preferences may differ between
individuals).

It also taps a bit into what Martin Duerst said some time ago about presenting or
using some unified approach, idea and framework for functional programming and
ideas originating from here. With many disparate, individual suggestions that
may partially "block" one another, it may indeed be difficult to use something
more unified and streamlined. So from that point of view, I think naruse's 
comment may be a good comment too, irrespective of the initial statement which
may not be the primary case/cause. (Although I also understand that his 
comment was not necessarily about preferences in regards to liking or 
disliking .: as such)

Syntax-wise in general oldschool ruby put up a high barrier as a "standard". :)
Syntax may not be the only or a primary area of concern when there are 
competing suggestions for new features and new behaviour, but I think 
that syntax is also quite important in general.

----------------------------------------
Feature #16275: Revert `.:` syntax
https://bugs.ruby-lang.org/issues/16275#change-82283

* Author: naruse (Yui NARUSE)
* Status: Open
* Priority: Normal
* Assignee: 
* Target version: 
----------------------------------------
`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.



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