5 ms·
Java: 11 I guess companies should stop using Java for big enterprise applications with tons of dependencies. Or this isn't a problem because programmers usuall
by oliverkyss 10y ago
Java: 11
I guess companies should stop using Java for big enterprise applications with tons of dependencies.
Or this isn't a problem because programmers usually know the basics of the language they are using. And if they don't, then that is the problem, not the language.
btw, Python: '1' * 3 -> '111'
- Ar-Curunir 10y agoThe python example is not an issue; you're going from string to a longer string, not to an integer.
- oliverkyss 10y agoThat's not true, you're going from string _and_ an integer, because '*' is a binary operator. (And it isn't communicative as shown here, which is another 'problem') But that's not really the point, crdoconnor seems to think that languages should throw an error in cases like this, not just keep the type of the first argument.
- crdoconnor 10y agoMain.java:17: error: incompatible types: String cannot be converted to int int z = x + y; >btw, Python: '1' * 3 -> '111' In theory I agree with this but in practise I see this so rarely used it barely matters.
- oliverkyss 10y agoSorry, I meant "11" (String), same result as with JS. see here: https://repl.it/Cqeq/0 https://repl.it/Cqeq/0