Java 1.5 a response to C# competition?

Ovid on 2004-01-07T00:46:37

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.


absolutely a response

lachoy on 2004-01-07T01:56:05

IMO these are absolutely a response to C#. Most people in the open source Java communities I run in seem to think so as well. I don't think this is a bad thing -- hopefully this will become a virtuous cycle where both languages innovate -- well, for a limited definition of innovate :-) -- and force each other to be more responsive to the day-to-day users.

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...)

silly company PR languages

mary.poppins on 2004-01-07T10:43:22

Use perl. Use ocaml. Use C. These were all designed by people with actual
problems to solve. (well, okay, ocaml does have some degree of silly
academicness to it . . . :)

Java and C# are silly corporate-PR-hyped things.

For what application would either Java or C# be better than one of {perl, ocaml,
C}?

    perl: super-compact notation (perl -pe is the super-sed)
    ocaml: speed, correctness, quite compact notation
    C: total control, no surprises from the compiler

Multiple Inheritance

RobertX on 2004-01-07T13:26:06

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. :)