NotNull pointers
Simen Kjaeraas
simen.kjaras at gmail.com
Wed Aug 31 10:36:04 PDT 2011
On Wed, 31 Aug 2011 18:57:01 +0200, bearophile <bearophileHUGS at lycos.com>
wrote:
> Simen Kjaeraas:
>
>> Next iteration:
>>
>> [x; 2 * x; iota(10); x & 1]
>
> If you don't like the syntax I've shown with foreach, then use the
> Python syntax, it's readable and short and good:
>
> [2 * x for x in iota(10) if x & 1]
> Or:
> [2 * x for x in 0 .. 10 if x & 1]
I feel it is too much a departure from the style otherwise present in D.
It is
important not only that the syntax is good in and of itself, but also in
the
context of D.
--
Simen
More information about the Digitalmars-d
mailing list