String Interpolation Compare - DIP1027 and YAIDIP

Steven Schveighoffer schveiguy at gmail.com
Sat Oct 21 05:12:17 UTC 2023


On Saturday, 21 October 2023 at 04:36:05 UTC, Walter Bright wrote:
> On 10/20/2023 8:56 PM, Steven Schveighoffer wrote:
>> On Saturday, 21 October 2023 at 03:48:49 UTC, Walter Bright 
>> wrote:
>>> The examples I used are copied verbatim from the YAIDIP. If 
>>> they're all false, please write a better proposal.
>> 
>> Your interpretation is false, not the examples.
>> 
>> They are examples of what's possible, not requirements.
>
> Then, again, a far more thorough proposal is necessary. YAIDIP 
> says nothing at all about `{03}` formats. It gives no examples 
> of them. `{ }` isn't even in the grammar! I'm not making false 
> statements about YAIDIP by saying it doesn't have them, because 
> it doesn't.

That's because it's not part of the proposed feature. It's just 
an example of how the proposed feature could be used. As is the 
"scientific" et. al. usage. If you understand the proposal you 
can understand the possibilities. Hopefully examples help to 
understand the possibilities without having to enumerate all 
future infinite possibilities.

That being said, this example in the DIP is poor IMO. It doesn't 
sell the feature at all, and to me looks like a step down. 
Technically some people might prefer that style of formatting, 
but I don't count myself as one of them.

> How it works needs to be clearly and completely written in the 
> specification.

Agreed. But it is important to note that YAIDIP and 1036 describe 
a *language feature*. The section on "Use Cases" is not a set of 
requirements for the proposal. They are just examples.

I think the DIP could be clearer about what is part of the 
proposal and what is just an example. It should have a clear 
statement such as "That concludes the proposal. The following are 
descriptions of examples that can be realized with the proposed 
feature, and are in no way requirements of the proposal."

-Steve


More information about the Digitalmars-d mailing list