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

Seb seb at wilzba.ch
Thu Jan 30 12:39:39 UTC 2020


On Thursday, 30 January 2020 at 09:46:38 UTC, Mike Parker wrote:
> This is the discussion thread for the Final Review of DIP 1027, 
> "String Interpolation":
>
> https://github.com/dlang/DIPs/blob/d8f2e769c3a8c711e7886ccecc93eac9795dae9c/DIPs/DIP1027.md
>
>
> Here in the discussion thread, you are free to discuss anything 
> and everything related to the DIP. Express your support or 
> opposition, debate alternatives, argue the merits... in other 
> words, business as usual.

Well, I guess the discussions and reviews will continue to boil 
down around Walter's position for tuples:

> Much of the discussion revolved around the syntax and the 
> choice of lowering to a tuple of format string and arguments, 
> and questions about interaction with other language features 
> (e.g., templates, token strings). The DIP author's position, 
> established over several comments, was essentially:

>    tuples can easily be manipulated to suit the user's needs
>    the implementation must be compatible with BetterC, meaning 
> printf and similar C functions
>    the implementation must not trigger GC allocations
>    the implementation must not depend on Phobos
>    the implementation must be performant

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).


More information about the Digitalmars-d mailing list