DIP 1027--String Interpolation--Final Review Discussion Thread

Sebastiaan Koppe mail at skoppe.eu
Thu Jan 30 13:20:47 UTC 2020


On Thursday, 30 January 2020 at 12:39:39 UTC, Seb wrote:
> Structs are essentially just fancy tuples and look the same 
> when stored in memory. Hence, I don't see why all of the above 
> can't be done by a templated struct?
> A templated struct would give the user a lot more options 
> through additional opt-in methods and allow APIs to overload 
> for them (e.g. SQL).

I reckon the answer is that it won't work with printf et al.

Which I find ironic because I believe the people who want 
interpolated strings most badly don't use printf at all.

That is of course always the problem of catering to a large group.

Still, it might just be that a templated struct will open up more 
options with more upside than the downside of it not supporting 
printf.


More information about the Digitalmars-d mailing list