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

jmh530 john.michael.hall at gmail.com
Tue Feb 4 23:53:15 UTC 2020


On Tuesday, 4 February 2020 at 21:49:18 UTC, Steven Schveighoffer 
wrote:
> [snip]
>
> The intention is for __d_interpolatedString (or whatever) to 
> return a struct that has an enum member which is the 
> interpolated format string, which is then alias this'd to the 
> struct.
>
> So the type should decay exactly into what the current DIP 
> says. It should be 100% compatible with printf.
>
> But if you want to do something different with interpolated 
> strings, you can overload your function to handle it specially. 
> Once you do that, you have access to the original parsed 
> interpolation string parts and formats.
>
> In short -- anything that would work with the DIP as currently 
> written would work with this new proposal.
>
> -Steve

Thanks. I think my confusion was more related to Walter's DIP 
than your suggestion.


More information about the Digitalmars-d mailing list