proposal: a new string litteral to embed variables in a string
Timothee Cour
thelastmammoth at gmail.com
Tue Nov 5 14:26:10 PST 2013
actually an important use case of this feature is to help writing domain
specific language inputs, eg writing a python file inside D, or config /
plain text files.
# is common in many languages (eg python/bash etc) as a comment.
@ would be inside string literal so should cause little confusion from D's
side, but for example would force one to escape '@' in email addresses
(more rare).
Frankly, this is bike shedding though; let's assume we pick one in
http://www.ascii-code.com/ and focus on whether we can agree on this
feature.
I'm using it extensively for great benefit: more DRY code, less spurious
files, cleaner integration with D.
On Fri, Nov 1, 2013 at 12:33 AM, Jacob Carlborg <doob at me.com> wrote:
> On 2013-10-31 22:47, Timothee Cour wrote:
>
>> $ is another obvious choice (eg in shell expansion)
>> but # could also be good as it's very much unused in D.
>>
>
> Yeah, # is only used for #line, which should be less common than $.
>
> --
> /Jacob Carlborg
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20131105/7fe53e21/attachment.html>
More information about the Digitalmars-d
mailing list