3 ms·
I was hoping for more but 11% is still significant. So that’s an extra million lines of code that didn’t need to be debugged.
by melling 4y ago
I was hoping for more but 11% is still significant.
So that’s an extra million lines of code that didn’t need to be debugged.
- krzyk 4y agoI wonder how much of this could be reduced if they used records in Java.
- kaba0 4y agoAn extra million lines of {, @NotNull, .stream(), .toList(). Hardly any code that would actually have bugs.
- strulovich 4y agoWe have a consistent braces style, so the lines that are removed are rarely those. A lot of the saves come from `?.` replacing null check chains. Many more from the shorter constructor and field initialization syntax (you can get a bunch of things in one short statement). A bunch more from usage of standard library lambda taking functions (`first`, `single`, etc.). Some more just comes from shorter lines due to less explicit types. These are all more some guesses due to conversions I've seen, and not the result of accurate analysis. We also use very little Java streams. A combination of Java 8 arriving late to Android code, and the preference to avoid extra allocations and inefficiencies streams can cause for shorter lists.