|
|
|
|
|
by jinst8gmi
3756 days ago
|
|
People need to apply common sense when writing code to ensure readability. Banning type inference isn't going to stop incompetent coders from writing bad/unreadable code. I'm talking as someone who uses both Java and now (mostly) Scala professionally. Java's lack of type inference is a source of great annoyance when I'm working on Java code. In my experience having types inferred for local variables strikes a good balance. |
|
Unfortunately managers hire cheap coders, so it was kind of useful this natural obstacle to repel code ninjas, or at minimum demotivate them from writing cryptic code.
I'll tell you, even with static typing rules I've seen code where I just think: "why, oh why?". One time found a nested IF chain that was 15 levels deep with other IF statements.
In Javascript it is honestly so difficult to try figure out what they were expecting as output, because comments are never present on the code. If you write scala, that is good but there are reasons why Java caters a different type of projects and audience.