Microsoft had just bought Java!!

Maybe many people would hate me for this, but Java 1.5 looks a lot like some Microsoft guy got into Sun's facilities like an spy, won the confidence of everybody in there and, somehow, wash their brains with Microsoft philosophy. Then, the Java community implemented many things in this Java version. Lets review:

* New for loop: looks like the "for each whatever thing" of Microsoft. On the other side, this doesn't affect any existing code, but improves programmer's development time. Yes: sounds like a Microsoft slogan. However, in my opinion this new feature is a good one.

* Autoboxing and Auto-Unboxing: Works just like Visual Basic (is it allowed to put the word "Java" and "Visual Basic" on the same page?!!!!! Discusting!!)!!! Fortunately, for now this is only for the primitives types, as I said, for now...... What's next? Default property?!! I hope not!

* Varargs: Well, another C integration. For me, Varargs can be made with a single array param. I want to think that the compiler would detect any ambiguos call. For example, if you have a function called "fx1" that receives 2 String params, and then you have another function that overloads "fx1", but receives String varargs. When you call fx1("Hello","World!"); how does it know which one will call? OK, the compiler has a way to determinate this but, what if you had no made any sintaxis fail in your code? Compiler won't complain about any error. But in logic, you program may fail during execution time, and you could spend many hours looking for the error, when it was as simple as the compiler created the bytecode to point to the incorrect function. For me, overloading was a good way to avoid ambiguos calls or confusing code. Yes, this makes coding task easier, just like Microsoft would say.

The other new features are OK. I think the ones above are the Microsoft one's. Will we have in Java 1.6 something like plataform-dependent, default properties, get and set vars, macrofunctions or anything similar?

[2027 byte] By [Dannie_Juge] at [2007-9-30 10:36:34]
# 1
Please use the subject of your post carefully. I almost had a heart attack.
kilyas at 2007-7-3 19:34:38 > top of Java-index,Other Topics,Java Community Process (JCP) Program...
# 2

Howdy,

but enhased for loopo or such things are just features for developer desires! i think they are not so fundamentaly important. All we have in our programming world ( i mean to 70% ) is earned from C/C++ .

so .. ! the importance is how a lingo can get that parts to work. there's no problem if C# used interfaces ( and single Object hierarchy e.g. ) these are just enhacements to a lingo ! when Games designed Java he disliked Templates in the lingo! but now we see them as generics...! the importance is that now Java is the God of Enterprise and Web programming ( with or withour enhaced for loop ). OK ?

i advise u to look fer ur needs and then choose ur development invironment. ( may be Java feeds, may be C#, may be COBOL [ just as fun ] , .... )

Behrad at 2007-7-3 19:34:38 > top of Java-index,Other Topics,Java Community Process (JCP) Program...
# 3

I think Auto- boxing / unboxing looks good to me, but not varargs.

Dannie said that varargs could be implemented as Object arrays. Did I mis-understand it? In fact, this does not solve all the problems. It is because primitive types cannot be put into Object arrays. However, Sun can add Auto- boxing / unboxing support to arrays. Then, varargs could be avoided by using Object arrays.

Anyway, I feel comfortable using something like "This is your %d-th chance." in C. But it seems odd to see this in Java. I think someone (like me) will think it is a step backward when they see this the first time.

I think adding automatic get / set methods by annotation (something like properties in Microsoft's terms) is not bad. I think it will be even clearer for the readers of the code. For example, when you code JavaBeans, you have to provide getter and setter methods. I think over 80% of time, the getter and setter methods are just dummies they do nothing more than they need to do. Using annotations to avoid adding these dummies makes the code cleaner and easier to read.

Of course, you may have many reasons to oppose it. Feel free to leave a message here so that everyone has a chance to discuss the matter.

kennethz at 2007-7-3 19:34:38 > top of Java-index,Other Topics,Java Community Process (JCP) Program...