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

Arine arine123445128843 at gmail.com
Thu Feb 27 18:07:19 UTC 2020


On Thursday, 27 February 2020 at 09:34:23 UTC, Walter Bright 
wrote:
> On 2/26/2020 7:41 AM, Arine wrote:
>> Yah, what's unwanted about that?
>
> 1. unwanted extra string allocation
> 2. poor performance
> 3. doesn't work with printf
> 4. doesn't work with writef
> 5. non-default formats require extra temp strings to be 
> generated

Sometimes I wonder if you even bother to read posts to understand.

This is a problem with YOUR DIP. Where you said, "what's wrong 
with that, it's working as intended".


    void CreateWindow(string title, int w = -1, int h = -1);

    int a;
    CreateWindow(i"Title $a");
    // becomes
    CreateWindow("Title %s", a);

That's what your fine with, that's what the DIP your wrote would 
allow.

It's like you are just reading what you want to, instead of 
actually understanding what people are saying. I'd have more luck 
talking to a brick wall at the rate this thread is going, jesus.


More information about the Digitalmars-d-announce mailing list