4 ms·
I've found this tends to happen in my Rust code too, and even in my JavaScript lately (though sadly it has performance costs in JS). It's true that 90% of loops
by brundolf 5y ago
I've found this tends to happen in my Rust code too, and even in my JavaScript lately (though sadly it has performance costs in JS). It's true that 90% of loops in practice are just for processing collections, and that can be better served in most languages by using a harder-to-mess-up construct that's designed for the purpose.
It really does almost feel like an extension of the goto trajectory, since loops themselves were one of the purpose-built constructs designed to cover specific, common uses of goto.
I wonder if we'll see a "control-flow considered harmful" one day (this is a joke... mostly)