Remember that Java is the language that introduced garbage collection to the world. Before Java, it was basically an untested academic thing that Lisp machines did. Why be liberal with such a radical new idea and conservative with things that let you implement programs the same way you do now but with less typing? It makes very little sense.
Typing a few less characters on boiler plate doesn't buy you anything, unless you're a slow/lazy programmer.
Typing "public static class" is boring, yes. But it's irrelevant. It can't contain bugs, so getting rid of that doesn't buy you anything at all.
Less typing != less bugs (When the code is compiled, statically typed, etc).
There is absolutely no reason to duplicate code in Java, and if you're copy/paste coding, it's not the languages fault, it's yours.
Must be nice to have an infinitely large short term memory.
Sometimes I wonder why I bother arguing with axod. Wait, I always wonder that...
I wonder why I try to bring sanity to these sorts of discussions also :/
But amazingly, sometimes code more complicated than that needs to be reused
I wonder why I try to bring sanity to these sorts of discussions also :/
When did you do that? You seem to bring a lot of emotion, very few technical arguments, and a lot of words like "fashion".
You can use "? extends SomeInterface" only if you write SomeInterface wrappers for every type which you want to use "generically." This is boilerplate relative to most other languages.
// T here is a type that must support these two operations:
// bool froznit();
// void frobnob(Foo* foo);
template <class T> class Frozner { ... }
And public interface SomeStupidName {
public bool froznit();
public void frobnob(Foo foo);
}
public class Frozner<? extends SomeStupidName> { ... }
To be just as much work to type.What they were shooting for seems to have been something that combines the syntax of C and some of C++ for easy access to a large pool of existing programmers but without those 'scary pointers', and the memory leak issues associated with bad programming habits in C and C++.