I dun a DIP, possibly the best DIP ever

Stefan Koch uplink.coder at googlemail.com
Fri Apr 24 23:21:44 UTC 2020


On Friday, 24 April 2020 at 22:42:13 UTC, Walter Bright wrote:
> On 4/24/2020 1:49 AM, Manu wrote:
>> static foreach is not an expression, and it's very hard to 
>> involve those result calls in some conjunction. Expand that 
>> code to || them together... it gets ugly real fast.
>> I wouldn't have wasted my time writing this DIP and a 
>> reference implementation if static foreach was fine.
>
> This is why I suggested in the "Challenge" thread that these 
> need to be motivating examples in the proposed DIP, not the 
> ones that are in there, which are not particularly motivating.

here is one.
For an alias seq containing the integers from 0 to 4096
construct another alias seq containing the every value of the 
original one with 3 added to it.
emit the last element of the newly created tuple plus the last 
element of the old tuple (should equal 8194) pragma(msg).

The compile time for that.
Has to take less than 50 milliseconds.
(as it does with our current proposal)


More information about the Digitalmars-d mailing list