Variable interpolation in strings
Justin Whear
justin at economicmodeling.com
Thu Jul 26 14:07:12 PDT 2012
On Thu, 26 Jul 2012 22:40:25 +0200, Tobias Pankrath wrote:
>> My original thought was to allow cool syntax like x!"embedded variable:
>> $foo" but template instantiations don't have access to variables from
>> instantiation scope (unless you pass them explicitly via alias,
>> of course).
>
> template mixins?
No, template mixins can only add declarations: "A TemplateMixin takes an
arbitrary set of declarations from the body of a TemplateDeclaration and
inserts them into the current context." (http://dlang.org/template-
mixin.html)
More information about the Digitalmars-d
mailing list