2 ms·
I found myself thinking the same thing until I got to the hugely nested if statements. I would definitely have created some early-return branches to that thing.
by marcus_holmes 2y ago
I found myself thinking the same thing until I got to the hugely nested if statements. I would definitely have created some early-return branches to that thing.
It does feel like the first "make it work" step (from "make it work, make it fast, make it pretty"), and then they just didn't do the "make it pretty" step. I have written code this "ugly" before, with this many comments, when working out a thorny state interaction. But I usually clean it up a bit before submitting for review. Maybe instead I should just put a huge "do not attempt to simplify this code" banner at the top hehe :)
But yes, it's not that bad, for sure.