3 ms·
A general rule of thumb I follow is to explicitly type your interfaces, and infer private internals. (I mean "interfaces" not referring to any specific languag
by Klathmon 8y ago
A general rule of thumb I follow is to explicitly type your interfaces, and infer private internals.
(I mean "interfaces" not referring to any specific language feature, but to the concept in general).
- steveklabnik 8y agoThis is sorta where we landed with Rust; you have to type out type signatures of function signatures, but not inside function bodies. It's not based on public/private lines, but it's a similar idea.
- deleted 8y ago[deleted]
- kjeetgill 8y agoAgreed! That's where Java 10 landed with var. Only local variables can have their types inferred but Fucntion signatures and fields need explicit types.