News for hackers. Stuff that matters.
Re:C++20 Improved the For-Loop Syntax by WalterBright on Wednesday July 15, 2026 @01:39PM (#48924429)
To clarify,

    foreach (s; vec)
works if you don't need the index. To be able to modify s in place:

    foreach (ref s; vec) s = "replacement";
Re:C++20 Improved the For-Loop Syntax by xigoi on Wednesday July 15, 2026 @05:34PM (#48927345)
I was talking about Go. I know you don’t need the index in D.