Comment on What could go wrong trying to solve AoC in Rust?
crispy_kilt@feddit.de 9 months agoJava 2 didn’t have streams nor iterator combinatorics, not sure what you mean?
Comment on What could go wrong trying to solve AoC in Rust?
crispy_kilt@feddit.de 9 months agoJava 2 didn’t have streams nor iterator combinatorics, not sure what you mean?
chinstrap@lemmy.ml 9 months ago
i didn’t mean as a version. I meant as overuse of streams
crispy_kilt@feddit.de 9 months ago
How would you have preferred to solve it? Using for loops?
AVincentInSpace@pawb.social 9 months ago
Python style iterator comprehension
(wonder if someone has made that into a macro)
crispy_kilt@feddit.de 9 months ago
I don’t think it would be readable. Too much going on. You’d need an outer iter over lines, an inner over words, a check for number and a conversion. And there would be zero error handling.