rfc:deprecate_dollar_brace_string_interpolation

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revisionBoth sides next revision
rfc:deprecate_dollar_brace_string_interpolation [2022/03/11 16:19] – Update 2022 ilutovrfc:deprecate_dollar_brace_string_interpolation [2022/03/11 16:20] – Fix quotes in code block ilutov
Line 14: Line 14:
   2. Braces outside the variable ("{$foo}")   2. Braces outside the variable ("{$foo}")
   3. Braces after the dollar sign ("${foo}")   3. Braces after the dollar sign ("${foo}")
-  4. Dynamic variable lookup ("${expr}", equivalent to ''(string) ${expr}'')+  4. Dynamic variable lookup ("${expr}", equivalent to `(string) ${expr}`)
  
 Options 1 and 2 have their pros and cons, but 3 and 4 are easily confused due to overlapping syntax, are strictly less capable than the first two options, and are rarely used in practice.  Option 3 is specifically less capable than 2, and option 4 has different semantics (dynamic variable lookup) that is rarely useful in string interpolation. Options 1 and 2 have their pros and cons, but 3 and 4 are easily confused due to overlapping syntax, are strictly less capable than the first two options, and are rarely used in practice.  Option 3 is specifically less capable than 2, and option 4 has different semantics (dynamic variable lookup) that is rarely useful in string interpolation.
rfc/deprecate_dollar_brace_string_interpolation.txt · Last modified: 2022/05/05 08:17 by ilutov