8 ms·
I think it’s important to point out what the imperative version would look like because I think the fundamental reason that the method chaining approach is more
by EnPissant 1y ago
I think it’s important to point out what the imperative version would look like because I think the fundamental reason that the method chaining approach is more readable is because it more closely resembles imperative code. When reading it, you start with a vector and then you mutate it in various ways before returning it. I understand that’s not how it’s implemented under the hood, but I don’t think it really matters.