Winston Gutkowski wrote:
Sayth renshaw wrote:What do you see as the advantages of Java?
2. final means final.
And that second one is a real showstopper for me. There are several things that I like in C# (first class properties being a particular fave), but the fact that you can override a final method? Atrocious. One of C#'s main developers as much as admitted that it's due to backwards-compatibility (how? when I read the article, C# was only a couple of years old).
When I design a class, I want to know that if I use the keyword final, that's what it means. I don't want to have to seal it, or lock it, or do anything else that, like a Microsoft delete, confirms that, yes, I really want to do this.
On a class, it means I can't extend it; on a field it means it's initialized exactly once; and on a method it means that it can't be overridden. EVER. (or at least, not till I take it off ).
Simple. And for that, I'm prepared to put up with a few "deficiencies".