From: recursive.madman@... Date: 2014-12-01T10:29:01+00:00 Subject: [ruby-core:66612] [ruby-trunk - misc #10541] Remove shorthand string interpolation syntax Issue #10541 has been updated by Recursive Madman. Brian Hempel wrote: > Answer: 19,869 of those string interpolations were like "#{@ivar}" or "#{$gvar}" or "#{@@cvar}". (Compared to 1,376 shorthand interpolations.) Did you also check what character followed those interpolations? e.g. "#{@foo}bar" wouldn't be a candidate for the shorthand, so that shouldn't be counted. There aren't that many cases, where the shorthand actually can be used, but in those rare cases I find it improves readability. One such case is appending an extension to a filename, e.g. "#@filename.bak". ---------------------------------------- misc #10541: Remove shorthand string interpolation syntax https://bugs.ruby-lang.org/issues/10541#change-50229 * 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/