Discussion Thread: DIP 1036--Formatted String Tuple Literals--Community Review Round 1

claptrap clap at trap.com
Sun Sep 13 09:40:34 UTC 2020


On Saturday, 12 September 2020 at 13:06:01 UTC, Andrei 
Alexandrescu wrote:
> On 9/12/20 5:27 AM, claptrap wrote:
>> On Saturday, 12 September 2020 at 02:48:38 UTC, Adam D. Ruppe 
>> wrote:
>>> On Friday, 11 September 2020 at 20:46:05 UTC, Paul Backus 
>>> wrote:
>>>> This solves the issue of accidentally passing the wrong thing
>>>
>>> And processing an i"" is trivial; it is just either a string 
>>> or a subclass of string (aka a struct with alias toString 
>>> this) and you'd just use it like that.
>>>
>>> The t"" is more composable; it is the superior language 
>>> feature. But I can live with a convenience compromise.
>>>
>>> So we'll see.
>> 
>> Thats a step in the right direction IMO.
>
> To me it seems akin to that moment you realize the practical 
> joke has gone too far.
>
> Flight attendant: "More of anything?"
> Seinfeld: "More of everything!"
>
> So now we're talking about not one, but two interpolated 
> strings. Deus Ex Machina and all that. (For fun and giggles: 
> Good Work six months from now will make their semantics 
> juuuuust slightly different.) How is this great design? There 
> is so much to be said about sense and sensibility; living under 
> one's means; economy of mechanism; creating a part of a whole; 
> and such.
>
> I really feel we miss a different mind on the team. Someone who 
> just thinks differently. Like an architect. Or a novelist.

One more interpolated string ... one more brain ... more of 
everything ;)

Maybe the problem isnot enough exploratory work is done up front? 
It's like evolutionary optimisation, if the initial set of 
solutions are not spread wide enough over the problem space you 
will inevitably converge on a local minimum instead of the global 
one.

I mean this DIP is a variation on Walters, Walters is an 
variation in writeln. They arnt really looking outside already 
established ideas for inspiration.

Its the convergent vs divergent thinking problem. And maybe 
programmers are very convergent in general, because you pretty 
constantly need to be evaluating what your doing as a programmer. 
So it's switch out of that way of thinking and just shoot ideas 
off with no criticism.

IE. Maybe have 4 or 5 people come up with as many solutions as 
possible, literally just write down ideas as they come to you. 
And then bring them all together and evaluate them. It's usually 
the outlier ideas that can spur people to "think differently" 
about the problem even if those outliers dont end up going 
anywhere.


> One possibility - which sadly comes from my limited engineering 
> mind - is to create and observe budgets for metrics that are 
> proxies to complexity.
>
> * 1000 words in the DIP
> * 1000 words complete documentation
> * 1000 words tutorial
> * 1000 lines in total implementation (compiler + library)
> * 30 seconds explanation that doesn't omit any dangerous 
> subtleties

Im only going on what I see in the newsgroup but it often seems 
like everyone has their own set of goals by which to judge the 
DIP, instead of there being a document saying the DIP should meet 
these goals, specifying if a goal is an absolute or very 
desirable, or just nice to have. I it seems there's a jump 
straight from "we want string interpolation" to "heres a 
solution" and completely skip "what do we really want from string 
interpolation".



More information about the Digitalmars-d mailing list