|
|
|
|
|
by trixie_
3030 days ago
|
|
Having the type name doesn't tell you anything about the type itself. Unless you have the type definition memorized, having the type declaration there is not very useful. If I replaced the types above with var, you would still be in the dark as to what an Account and/or Transaction is without going to the type definition. |
|
I can see that the thing returned from getAccount() is an Account object! It's not an accountId, or the name of the account, or an AccountDTO, or an Optional<Account>, or any of the dozen other things I've seen people return from methods named getAccount().
Depending on how methods are named, the implicit documentation can be very helpful:
I don't think that var is particularly evil, but I think it has a poor case for existence. Meh.