_aaApply2

IchorDev zxinsworld at gmail.com
Mon Jul 22 15:49:54 UTC 2024


On Monday, 22 July 2024 at 15:28:45 UTC, H. S. Teoh wrote:
> You can actually use this interface in user code too: 
> aa.byKeyValue().  The non-range interface is really for 
> compatibility with legacy code.

The struct has one loop value instead of two though, so you have 
to rewrite code to use `.key` and `.value`, which is not as good 
as being able to name the key & value yourself. It would’ve been 
possible for it to be implemented differently though: 
https://dlang.org/spec/statement.html#front-seq


More information about the Digitalmars-d mailing list