String Interpolation

Timon Gehr timon.gehr at gmx.ch
Fri Oct 27 21:19:43 UTC 2023


On 10/27/23 17:59, Imperatorn wrote:
>>
>>> That basically what the current implementation does.
>>
>> No, that's not true.
> 
> You just say "no" without providing any evidence. Why?

What can be stated without evidence can be dismissed without evidence.
You made a ridiculous analogy. You are acting like people simply have to 
be crazy for not seeing it your way. Like in fact, the devil is not in 
the details.

I think concerns like the interpolated string expanding into multiple 
local variables being surprising behavior are much more important than 
claims like "you have to be crazy for not doing it like those 5 other 
languages, psychologists say so!".

> 
>> Sometimes there is a better solution.
> 
> Here you are actually correct and have a point. There might be better solutions. And D might be the first to show that.
> ...

Interestingly, no. The Java proposal linked earlier is similar in this 
respect.

> But think of it in terms of probability.
> 
> Is it more probable that we, or the rest of the world, are wrong?

It has _already been shown to be a source of issues_. It's simply the 
power of hindsight, afforded to D because Walter has been somewhat 
conservative in adding new shiny features. D often ends up doing things 
somewhat differently to avoid pitfalls into which other languages have 
fallen. This is a meaningfully different endeavor to stupid straw-man 
proposals like breaking language changes such as `int.asint`, 
accident-inducing captcha on car breaks, or having lightbulbs be 
activated by 30 seconds of screaming.

When you engage in such comparisons, you are essentially saying 
"different implies worse. I don't have to make the case. if you were a 
reasonable person, you would already agree with me". The implication 
actually goes the other way around. But this is not surprising. Better 
is also always different.

> 
>> I am not surprised, just disappointed at the quality of discourse.
> 
> Your subjective view of the quality of discourse is of course important, ...

Nothing particularly subjective about it. E.g., from you last post:

> But don't be surprised when they think you're doing something that feels unnatural to them. Like using a door, flipping a switch or whatever you do every day. If suddenly someone thought it would be a splendid idea to make you scream for 30 seconds straight to make the light bulb turn on, great, do that. But don't try force convince the rest of the world that your borderline psychotic behavior would be "normal" and that it would be offensive to question the design. 

This insulting hyperbole adds nothing to the discussion. All it does is 
attempt to discourage people from engaging in a discussion with you, 
because you accuse them of being crazy for having a nuanced perspective. 
You are also rudely twisting my words here. Questioning the design is a 
priori not offensive. I would be glad if you were just questioning the 
design. But maybe try accepting or critiquing some of the answers on 
their own merit and toning down your GPT-fueled fallacious rhetoric and 
appeals to popularity.

> ... but it does not change any of the facts provided. 

Well, in a high quality discourse, facts would be provided instead of 
personal attacks that are then critiqued in a meta-discussion advocating 
for basic civility. So yes, it would change the facts provided.


More information about the Digitalmars-d mailing list