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


I have recently read something which may be incorrect; but perhaps it may
be correct too, I do not know. The comment I read was sort of meant as a
joke perhaps ... or it was a first april joke. But it's not quite first
april so I should better ask early (before first april!).

I did read recently that one reason why **backtick** ` may be deprecated
(if it is to be deprecated) is because it may be used for something else
in ruby 3.x.

I do not know whether this is true or not so perhaps it is best to ask on
the bug tracker here, so that other ruby hackers know whether this is only
a rumour or whether it is more than a rumour.

- May this potential change in regards to backticks, if it is to come,
also imply a change to the use of '::' scoping or semantics?

The reason why I ask is primarily because, to me, visually, it may make a
huge difference, if this were to be the case. If, on the other hand, no
change is planned in regards to '::', then of course it is no problem at
all for me since I can keep on using '::' in ruby 3.x as well.

For example, when frozen strings were added, ruby hackers could (and still
can) use a "magic comment" to decide whether to use them in a given .rb
file or not. I make use of this a LOT and this was a good/neutral change
(for me) in the sense as I can decide (and control) which syntax to
prefer,

For example, these two syntax variants:

    string = ''

versus

    string = ''.dup

To me, visually, the first line is much cleaner than the second, so I prefer
it of course. What is good here is that the old variant still works fine
and I can specify this in the comment/post-shebang section on top of the
ruby file in question.

However had, I also understand performance improvements made to ruby and I am
using the second variant, with .dup, a lot as well - in particular in libraries
that may be re-used by lots of other projects. Or when a ruby project is fairly
large, then I often use frozen strings. Although I have not made use of 
extensive benchmarking, I am reasonable certain that the speed gains through
frozen strings alone, were quite significant in the ruby code that I use.

I like having this flexibility a lot. I can pick cherries - or cake. Rather
than pick only cherries; or only a cake. :D

That is also why I am somewhat anxious about any change made to '::'. I do
not really mind losing Kernel backtick in the end, even though I like it and
use it a lot; but a change to '::' would impact me much more significantly.

Either way, I think staying informed about any change here may be interesting
to other ruby hackers as well, so thanks to all among the core team to keep
the ruby users informed. (I myself much prefer being informed early rather
than late, even if nothing has been finalised yet and everything is still
an idea only).

----------------------------------------
Feature #14385: Deprecate back-tick for Ruby 3.
https://bugs.ruby-lang.org/issues/14385#change-70651

* Author: hsbt (Hiroshi SHIBATA)
* Status: Open
* Priority: Normal
* Assignee: matz (Yukihiro Matsumoto)
* Target version: 
----------------------------------------
From https://bugs.ruby-lang.org/projects/ruby/wiki/DevelopersMeeting20171212Japan#From-attendees

Matz hopes to deprecate backtick syntax(``) for Ruby 3. We should warn about it at Ruby 2.6 (or 2.7?)

We need to consider them.

* warning message
* warning level
* ?



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