https://issues.dlang.org/show_bug.cgi?id=10009
--- Comment #17 from yebblies <[email protected]> --- (In reply to Steven Schveighoffer from comment #16) > (In reply to hsteoh from comment #12) > > It *is* possible to implement a reverse traversal in AA's. I'm just not sure > > it's a good idea (it'd need to allocate memory in order to traverse the > > linked-lists in reverse order). > > Or you could recurse :) > > Either way, you need memory. > > I think we have two legitimate options: > > 1. Fix foreach_reverse .byKey so it does the same thing as foreach > 2. Make foreach_reverse illegal on all cases of aa. > > I lean towards 2. > > The goal should be consistency. Making the thing actually work in reverse I > think is not possible. 2 is absolutely the answer. Basically copy-paste the error from the delegate foreach_reverse. The check should be the same, just in the Taarray block. --
