The state of string interpolation

Jonathan M Davis newsgroup.d at jmdavisprog.com
Sat Dec 8 02:04:01 UTC 2018


On Friday, December 7, 2018 5:58:43 PM MST o via Digitalmars-d wrote:
> On Friday, 7 December 2018 at 23:56:48 UTC, Adam D. Ruppe wrote:
> > On Friday, 7 December 2018 at 23:46:45 UTC, o wrote:
> >> Also, see Andrei's comment:
> >> https://github.com/dlang/dmd/pull/7988#issuecomment-375760720
> >
> > He seems to also have the misunderstanding that was common
> > earlier in this thread that tuple == std.typecons.
>
> This is probably going to confuse more people, so we should refer
> to them as "sequences" in the DIP. Also, I am calling it "String
> Sequence Literals" instead of "String Interpolation" because it
> is more broad - more than just interpolation can be done with
> this.

Personally, I'd just use the term AliasSeq, because that's what the
associated template for them in Phobos is called. Just about anything else
is going to be confusing. It's really unfortunate that Walter originally
decided to call them tuples given that they aren't quite tuples, but there
really isn't a good term for them ultimately. As it is, AliasSeq was just
the best of a bad set of choices, but at least it's clear what you mean what
you use the term, whereas just about anything else breeds confusion.

- Jonathan M Davis





More information about the Digitalmars-d mailing list