Worst ideas/features in programming languages?

Quirin Schroll qs.il.paperinik at gmail.com
Sat Dec 18 19:54:11 UTC 2021


On Monday, 15 November 2021 at 14:19:00 UTC, Steven Schveighoffer 
wrote:
> On 11/15/21 7:41 AM, Timon Gehr wrote:
>> In particular, there is `static foreach_reverse`.
>
> Although it's fallen mostly out of style, the reason I hated 
> `foreach_reverse` is because it used to be applicable to 
> delegate iteration, but just iterates forward (I've just 
> checked and it's deprecated, but not disabled).

Maybe this is older. When I came to D around 2015, I learned that 
there is `opApply` for forward iteration (`foreach`) and 
`opApplyReverse` for reverse iteration (`foreach_reverse`). I 
just tried defining a struct with `opApply`, but no 
`opApplyReverse`, and then `foreach_reverse` on an instance (on 
run.dlang.io). Doesn't work.


More information about the Digitalmars-d mailing list