From: plasticchicken@...
Date: 2014-12-01T14:11:40+00:00
Subject: [ruby-core:66618] [ruby-trunk - misc #10541] Remove shorthand string interpolation syntax

Issue #10541 has been updated by Brian Hempel.


Martin D��rst wrote:
> Can you tell us what the situation is for Ruby itself (including build scripts and standard library)?

In the ruby/ruby repo, the shorthand is used 115 times, regular is used 12,473 times. (12,473 is all regular string interpolations, not just those interpolations that could use shorthand.)

Full stats: https://gist.github.com/brianhempel/beaeb7d2db7f9046da5d#file-ruby_construct_frequencies_in_ruby-txts
Files that use shorthand: https://gist.github.com/brianhempel/beaeb7d2db7f9046da5d#file-files_using_shorthand-txt

Ripper does not parse "test/ruby/test_mixed_unicode_escapes.rb", but it does not appear to use the shorthand syntax.

----------------------------------------
misc #10541: Remove shorthand string interpolation syntax
https://bugs.ruby-lang.org/issues/10541#change-50235

* Author: Daniel Morrison
* Status: Open
* Priority: Normal
* Assignee: Yukihiro Matsumoto
* Category: syntax
* Target version: current: 2.2.0
----------------------------------------
I would like to see the shorthand string interpolation syntax, "foo#@bar" deprecated and then removed in 3.0.

My reasons:

1. Most experienced Ruby developers I've talked to don't even know it exists.
2. It has been the cause of real problems. http://status.cloudamqp.com/incidents/vj62pnp62tj9

When a syntax is not widely known and has the potential for problems, I think it makes sense to deprecate and remove. 



-- 
https://bugs.ruby-lang.org/