Metaprog can be abstruse
drug007
drug2004 at bk.ru
Mon Jul 4 10:27:18 UTC 2022
On 7/4/22 12:43, user1234 wrote:
> On Monday, 4 July 2022 at 09:40:45 UTC, Bastiaan Veelo wrote:
>> Not necessarily.
>> ```d
>> immutable decimalRanks = iota(10).map!(p => 10.pow(p)).array;
>> ```
>>
>> -- Bastiaan.
>
> Hi, to this alternative I'd say that it's not self documenting.
> So it still has 50% of the initial problem.
>
>
As for me it is self documenting. And it is more readable than your hand
written imperative version.
More information about the Digitalmars-d
mailing list