Not having played with C#, I can't comment on it other than to say that a number of people I respect have given it a thumbs up. I can't help but wonder if Java 1.5's autoboxing, generics, improved for loop and other features are a result of C# competition or if this an example of Sun really paying attention to some things needed in the language?
The autoboxing really strikes me as significant. Mixing primitives and objects in the language has long been one of the largest sources of complaints about the language. Autoboxing seems like a hack instead of going with a flyweight pattern, but it's better than ignoring the problem (and I can't say that I know enough about the technical reasons for the decision). Still, I can't help but shake the feeling that Sun is behaving a bit like Microsoft here. Once MS dominated the browser market, they pretty much stopped developing IE. Sun, having developed a hugely popular language, seemed content to ignore some of the crufty features -- until C# started giving them the boot.
Now I wonder when they're going to fix their silly inheritence issues. Interfaces can help, but they were only a partial solution to the multiple-inheritance issues. I wouldn't be surprised to see Sun come up with proposals for multiple inheritance, mixins, or traits. I think Java is finally getting interesting.
I think most of the innovation in Java is bubbling up from (surprise!) the opensource community. For instance, there are a number of projects that implement mixins -- I know this is an intentional side effect of the AOP framework Nanning. I feel pretty confident in saying that Java will never have multiple inheritence
There's also quite a few projects to create light(er)weight languages using the JVM. Most recent is Groovy, which seems to be deeply influenced by Ruby's syntax and usage. (Spoken as someone who has had only the briefest exposure to Ruby...)
That will (and I think rightly so) not be in the Java language anytime soon.
I think the improvements are a little of both Sun listening and C# competition.
Perl is great and I use it. Try writing a really huge application in it and still maintain your sanity. : )
Re:Multiple Inheritance
chromatic on 2004-01-07T19:17:02
Try writing a huge application in any language and still maintain your sanity!
Re:Multiple Inheritance
mary.poppins on 2004-01-08T20:43:28
I would rather use perl than java for any-size program.
One of the important factors, of course, being that the program expressed as
perl code would be much less huge.:)