DIP 1026---Deprecate Context-Sensitive String Literals---Community Review Round 1

Jonathan M Davis newsgroup.d at jmdavisprog.com
Tue Dec 3 15:23:03 UTC 2019

On Tuesday, December 3, 2019 8:09:19 AM MST Dennis via Digitalmars-d wrote:
> On Tuesday, 3 December 2019 at 15:05:14 UTC, Jonathan M Davis
> wrote:
> > There are definitely people who use token strings in their code
> > when writing string mixins, because it makes it so that the
> > code in the strings actually gets syntax highlighting like
> > normal code does instead of being displayed as a string.
> I don't propose deprecating token strings, only the identifier
> delimited ones, which get highlighted as strings.
> ```
> string s = q{
> this is fine
> };
> string t = q"EOS
> this is not fine
> EOS";
> ```

Ah. Clearly, I glanced over it all too quickly. I confess that that
particular type of string literal seems useless to me. I don't think that
I've ever seen anyone use them, and I'd be even less interested in using
them than token strings. I don't feel particularly strongly about whether we
remove them from the language, but if we were talking about adding them, I'd
certainly be against it.

- Jonathan M Davis

More information about the Digitalmars-d mailing list