What are delimited strings good for?
Stewart Gordon
smjg_1998 at yahoo.com
Mon Apr 11 14:08:56 PDT 2011
On 10/04/2011 21:51, Jonathan M Davis wrote:
<snip>
> If that had been `something instead of 'something, _then_ the delimited string
> becomes useful, but given how rarely backticks are needed, it does seem rather
> odd to have delimited strings just for that. So, I definitely have to wonder
> why they exist.
I guess for those odd occasions when you want to embed large blocks of text/code in your
program and not worry about what characters it may contain, because your choice of
delimiting token is too contrived to actually appear in the string. It's probably the
same reason that Perl has a similar feature.
And I can imagine it having metaprogramming uses.
Stewart.
More information about the Digitalmars-d-learn
mailing list