Can you do this in D?

Jacob Carlborg doob at me.com
Thu Jul 26 23:43:20 PDT 2012


On 2012-07-27 01:55, Walter Bright wrote:

> What is the utility of operators $, # and @?
>
>
>  > Specifically I'd like $prefix to be stringification.
>
> Can you please be more specific about what this might do?

If I understand him correctly I think:

$variable

Would be the same as:

to!(string)(variable)

And/or:

"foo $variable bar"

Would be the same as:

"foo " ~ to!(string)(variable) ~ " bar"

The later would be string interpolation.

-- 
/Jacob Carlborg


More information about the Digitalmars-d mailing list