DIP 1027---String Interpolation---Format Assessment

Steven Schveighoffer schveiguy at gmail.com
Tue Feb 25 15:08:38 UTC 2020


On 2/25/20 8:39 AM, Aliak wrote:
> On Tuesday, 25 February 2020 at 13:04:41 UTC, Adam D. Ruppe wrote:
>> On Tuesday, 25 February 2020 at 09:36:25 UTC, aliak wrote:
>>> [...]
>>
>> Yes, that is the key impetus of our amendment, which I also wrote up 
>> on a gist weeks ago.... and it is now on github too! 
>> https://github.com/dlang/DIPs/pull/186
>>
>> [...]
> 
> I should’ve been more specific 😬 I was wondering if the same could be 
> achieved without a introducing a new aggregate type!

I think there is not, unless you wanted to implement special rules in 
the compiler for string interpolations.

And that would be akin to overloading (something like "you have to tag a 
function as @acceptsinterpolation to have it work with interpolated 
strings"). Much simpler to just have a different type.

-Steve


More information about the Digitalmars-d-announce mailing list