Mixin programming foreach

Ali Çehreli acehreli at yahoo.com
Mon Sep 27 17:43:22 UTC 2021


On 9/27/21 10:26 AM, Tejas wrote:
 > On Monday, 27 September 2021 at 17:14:11 UTC, Ali Çehreli wrote:
 >> On 9/27/21 9:23 AM, eXodiquas wrote:
 >>
 >> > [...]
 >>
 >> Same here. :)
 >>
 >> > [...]
 >>
 >> Often repeated but there are no stupid questions.
 >>
 >> [...]
 >
 > Sometimes I wonder if I should bother writing answers since one of you
 > Old Guards make them redundant(and inadequate) :(

Point taken.

 > I'm really surprised you went with his name-every-element-uniquely
 > scheme though. Why didn't you recommend `static array`? Are there
 > genuine use-cases where it makes more sense?You only mentioned it when
 > it came to the traversal part.

I noticed that too. ;) I could have changed other things there as well. 
For example, I wanted to replace 'int' with 'size_t', which I did 
eventually.

I think staying with the original code as much as possible is helpful 
for the OP to follow the response. Also, sometimes I miss what the 
original intent is. :)

Further, the original post touched on many concepts like eponymous 
templates that I wanted to expand on instead of a short answer.

Ali




More information about the Digitalmars-d-learn mailing list