Talk:Variable interpolation
Appearance
![]() | Computing Redirect‑class | ||||||
|
Uses of variable interpolation
"Here, Interpolation can be used in the best way"
The best way is creating 15 separate variables when arrays should instead be used? I doubt that's the best use of variable interpolation. Text replacement seems the most common and effective use of this tool. Generating 15 variables when more efficient programming constructs are available is not "the best way".
Unfortunately, I don't have subject-matter expertise and am thus hesitant to modify the article.Pritchard 21:43, 27 July 2012 (UTC) — Preceding unsigned comment added by TheAdventMaster (talk • contribs)
TODO
The following additions would enhance the article.
- Give examples of more widely differing interpolation schemes, and contrast their different properties, such as the following.
- Escaping: escaping rules allow the introducing character ($) to stand for itself; not all interpolation schemes have complete support for such escaping.
- Windows shell '%foo%' notation: the special character goes at both the start and the end of the name.
- Recursive expansion: interpolation in the C preprocessor #define syntax is recursively expanded until no more expansion occurs, while most schemes are not.
- The #define syntax also doesn't use an introducing character, but identifies 'variable' names in a different way.