| In the example you mention it is readable. Perhaps you can agree that for an extended class (not a primitive like a String) it will make code quality revisions for both humans and compilers more difficult? Because in Java you find classes extended very frequently and the code always should point to whatever object you are expecting so that the output is perfectly clear for everyone. A positive side-effect is that some people will try to cram-up as many instructions per line as they can, for readability purposes they are literally forced to break their code into perfectly readable (and repeatable) functions. This in turn makes the code easier to breakpoint/debug/audit. I'm talking as someone who professionally programs both in Javascript and Java. For me the real beauty of Java is not having to look at someone else's code that crams up functions within functions and type infers everything he can. Really, it gets quite painful to review and debug such code. So would be sad to see Javascript ninjas now start jumping into Java and doing the same kind of thing. We don't need ninjas to quickly hack Java code together, we need proper engineering that builds lasting and maintainable code. So, different audience and purposes (philosophies if you will). |