Can we drop static struct initializers?

Max Samukha spambox at d-coding.com
Sat Nov 21 11:49:21 PST 2009


On Sat, 21 Nov 2009 18:51:40 +0000 (UTC), dsimcha <dsimcha at yahoo.com>
wrote:

>== Quote from Max Samukha (spambox at d-coding.com)'s article
>> On Fri, 20 Nov 2009 15:30:48 -0800, Walter Bright
>> <newshound1 at digitalmars.com> wrote:
>> >Yigal Chripun wrote:
>> >> what about foreach_reverse ?
>> >
>> >No love for foreach_reverse? <tear>
>> And no mercy for opApply
>
>opApply **must** be kept!!!!  It's how my parallel foreach loop works.  This would
>be **impossible** to implement with ranges.  If opApply is removed now, I will
>fork the language over it.

I guess it is possible:

uint[] numbers = new uint[1_000];

pool.parallel_each!((size_t i){
        numbers[i] = i;
    })(iota(0, numbers.length));

Though I agree it's not as cute but it is faster since the delegate is
called directly. Or did I miss something?



More information about the Digitalmars-d mailing list