3 ms·
The problem with naming variables is that you then have to deal with their scopes in review. For example, the following Java Foo getSmallFoos() { ret
by xmcqdpt2 3y ago
The problem with naming variables is that you then have to deal with their scopes in review. For example, the following Java
Foo getSmallFoos() {
return foo
.stream()
.filter(...)
.collect(...)
}
is a lot more readable IMO than if each individual steps were named, especially because reusing stream steps is a runtime failure. Not having names is a good way to enforce linearity in the absence of affine types.