From: daniel@...42.com Date: 2019-10-23T18:29:52+00:00 Subject: [ruby-core:95511] [Ruby master Feature#16275] Revert `.:` syntax Issue #16275 has been updated by Dan0042 (Daniel DeLorme). I'm also in favor of removing `.:` until a better "whole picture" is formed. Besides, that syntax encourages the idea that symbols are closely related to functional objects. And it looks like cuneiform. For example, if we consider that `->` is a functional syntax for lambdas, we could adopt the '>' character as a common element of functional syntax in general. Below is a _very hypothetical_ example just to show that a whole-picture view could possibly lead to different results: ``` potential functional operators !> &> (> *> +> ,> -> lambda /> :>word :word.to_proc ;> <> @> [> \> ^> `> {> |> pipeline ~>word obj.method(:word) ~~>word obj.instance_method(:word) conflict / already used "> string '> string #> comment $> stdout %> string )> greater-than .> greater-than => hash literal >> right shift ?> erb ]> greater-than }> greater-than ``` ---------------------------------------- Feature #16275: Revert `.:` syntax https://bugs.ruby-lang.org/issues/16275#change-82287 * 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: