2 ms·
Both styles still encourage a lot of mutability and complexity throughout the codebase. The vast majority of typed web codebases I've seen were exercises in Ja
by jeremiep 10y ago
Both styles still encourage a lot of mutability and complexity throughout the codebase.
The vast majority of typed web codebases I've seen were exercises in Java Enterprise development of various degrees. Generics or not the time spent typing everything is not matched by the advantages of static typing.
You'd get more robustness by managing complexity and state; I've spent far more time hunting down bugs that passed through the type-system and tests than fixing typos in dynamically typed languages.
- lloyd-christmas 10y ago> Both styles still encourage a lot of mutability and complexity throughout the codebase. > You'd get more robustness by managing complexity and state; The top function has a return value of T. That's not encouraging mutability. It's only mutable because JS pass by reference, which is irrelevant to static/dynamic. If you use the return value instead of the passed value, it's "effectively" immutable and is a great way of managing state.