string interpolation fun
schveiguy at gmail.com
Thu Dec 13 16:29:36 UTC 2018
On 12/13/18 11:21 AM, Jonathan Marler wrote:
> Adding support for the `$foo` case (no parens) would be fairly trival,
> but requires making a decision of what type of grammar node/token to
> use. We could use the same mechanism that templates use, but that would
> mean that something like $foo.max would be $(foo).max instead of
> $(foo.max) which seems a bit unexpected. That would be a good thing
> include in the DIP, a list of the obvious tokens/grammar nodes we could
> use and their pros/cons.
Yeah, I would recommend $foo.max be $(foo.max). This isn't like
templates, where the dot is meaningful both ways.
More information about the Digitalmars-d