4 ms·
Yeah this might be true of Java, but I think for modern languages with good type inference it adds a lot to readability without much cost in terms of verbosity.
by skohan 5y ago
Yeah this might be true of Java, but I think for modern languages with good type inference it adds a lot to readability without much cost in terms of verbosity.
After working with more strongly typed languages, it actually seems crazy to go back to JS or Python and not have type information in function signatures. Like how are people supposed to read code and understand what this function is allowed to take?
- joelbluminator 5y agoFunctional programmers also say "how can I go back to mutable state and OOP". The fact is people get stuff done in many different ways and paradigms. You found what works for you and that's good, stick to it. Others found theirs.
- arcturus17 5y agoYou can annotate types in Python and Typescript. Before that large companies like Google got around it by annotating in the comments. It may be an inferior solution but huge codebases serving hundreds of millions of users have worked this way.
- gefhfff 5y agoHuge code bases serving hundreds of millions have been written in wasm, so...? Bad argument
- arcturus17 5y agoThere was no argument, the commenter was just asking “how”.
- kaba0 5y agoModern Java is not what people may remember. It has var keyword for local type inference, lambdas, etc.