I dun a DIP, possibly the best DIP ever

Steven Schveighoffer schveiguy at gmail.com
Sat Apr 25 00:57:54 UTC 2020


On 4/24/20 7:07 PM, Adam D. Ruppe wrote:
> On Friday, 24 April 2020 at 22:21:31 UTC, Walter Bright wrote:
>> I did a little research:
>>
>>     ∀xP(x)
>>
>> means:
>>
>>     for all x in P(x)

First, please can we avoid untypeable symbols?

Second, this really is a "function" of the expression, not the tuple. A 
tuple already means "all it's elements". What we want to say to the 
compiler is to expand the expression for each of the tuple combinations 
included.

It's very much like array vector expressions. However, array vector 
expressions work across a whole statement. This cannot be that, it has 
to work within an expression, because you can't declare an intermediate 
expression like a parameter tuple. If you want to use vector expressions 
inside a larger expression, you can put them in a temporary first.

Is there really an issue with ... so much that we need to search for 
something else? Or are you complaining about the feature itself? I think 
the ... is pretty readable.

>>
>> or in ... notation:
>>
>>     P(x...)
> 
> Shouldn't it actually be
> 
> P(x)...

Yes.

-Steve


More information about the Digitalmars-d mailing list