Tiger, Mustang, Dolphin

Guess… everything?

[quote]what is wrong with autoboxing?
[/quote]
Here’s whats wrong with autoboxing:

http://www.javalobby.com/forums/thread.jspa?threadID=13257&tstart=270

Sigh. Am seriously considering quitting java (not anytime soon, but starting the process of re-specialising in something else) over the crap that’s been forced upon us with java 5. Especially given how long and hard people (Sun, and others) fought to keep much more important things OUT of java, only finally to cave in on things like this that are astonishingly poor by comparison.

At the end of the day, those with numerical superiority are simply throwing their weight about and proving that if one uses a language whose main users by volume and wealth probably ought to be using Visual Basic for most of their work that you WILL get ****ed over, sooner or later, when the language gets dragged off in a hopeless direction. Hopeless to you, that is; for them, it’s evolution.

You can’t blame them for wanting to turn the only language they use (java) into the language they really want (VB), hoping to retain some of the exclusive benefits of the one, but not at the cost of keeping them away from the other.

A little part of me somewhere still holds out hope that java 6 will cut the “assert” crap and substitute in a real assertion system, now that 1.4 has forced people around the world to re-write their code to avoid the new keyword. Yeah right; might as well hope to wake up one day and find generics has been removed from all future versions of java…

[quote]what is wrong with autoboxing?
[/quote]
If nothing else, the fact that it (and generics) could actually have been so very much better designed and implemented. Makes you wonder how - with the combined might of all these tech companies - they managed to end up with such a mess.

[quote] Sigh. Am seriously considering quitting java (not anytime soon, but starting the process of re-specialising in something else) over the crap that’s been forced upon us with java 5.
[/quote]
Yeah, but were would you go? What other platform or language can give you half of what java does?

That is quite a pitfall with autoboxing.

For projects one controls, one can always have a rule against autoboxing in the coding standards.

Will.

[quote]For projects one controls, one can always have a rule against autoboxing in the coding standards.
[/quote]
Yes, it would be nice if javac had an option for each new language feature that would issue a warning when the feature is used.

I just set Eclipse to 1.4 and let it complain :slight_smile: I don’t think I’m going to use any features other than static import. Maybe enums one day.

Cas :slight_smile:

enums are a good idea, saves having enum classes all over the place.

Of course, I am waiting for 1.5 on Mac first…

Will.

D is shaping up to be a nice alternative. I’m finding myself working with it more and more. Many of the newsgroup regulars are disgruntled Java programmers. As such, several of the community libraries springing up have a distinct Java flavor.

[quote]D is shaping up to be a nice alternative. I’m finding myself working with it more and more. Many of the newsgroup regulars are disgruntled Java programmers.
[/quote]
The funny thing (about this being at the end of this thread) is that D has generics and operator overloading, which are things people are complaining about Java having! Or maybe they’re complaining about how they were implemented but being subtle about it…?

[quote]I just set Eclipse to 1.4 and let it complain :slight_smile:
[/quote]
Problem is I like and use generics, enums, varargs and foreach. I just want to disable static imports and autoboxing.

Btw, the 1.5 support in Eclipse is ridiculously bad. It doesn’t even seem to support switching on an enum object.

Mostly it’s complaints about the implementation of generics. The only real advantage generics have now is eliminating having to type (casts) all over the place and that comes at the expense of some fairly ugly syntax in its place instead - with no performance boost.

Cas :slight_smile:

I’m not using generics for performance reasons (because as you say, there are none), I use it for code clarity and better IDE help. The information content in the code is increased when using generics.

I think the generics syntax is ok, I can’t think of a better one.

And yes, the generics support in Eclipse is quite bad. :slight_smile:

[quote]I just want to disable static imports and autoboxing.
[/quote]
What’s the problem with static imports?
Aside from losing a little bit of context.

That is the problem. The class name before a static method or variable is quite important for someone trying to read your code. The key strokes saved when writing the code are definitely not as important.

In some cases it’s trivial to understand which method you refer to, for example sin() -> Math.sin(), but in the general case I think static imports should be avoided.

The same could be said for most of the additions to java 5. And people wonder why we complain that it’s a step backwards…

I’ve no problem with static imports - although I have a sneaking suspicion that you should only ever be allowed to statically import from ONE class in a single file. The situations where static import is a significant improvement are quite specific, however. Maybe javac should refuse to compile a class with static imports if it doesn’t think it warrants it? ;D

And Blah, I disagree! On the contrary, I think Generic Collections are a vital part of any stable application, if only because of the reduction in the chance for human error. And the enhanced for-loop is a great addition to the language.

But autoboxing? No thanks. There are too many circumstances where it requires more thought and more care, else undesired operation will result. And annotations will continue to be irrelevant for many moons to come.

Yes, saying the Java 5 is a step backwards is a bit too much. There are some good additions. Generic types, although it could have be implemented better, is better than no generic types. Enums is a good addition. The enhanced for-loop is nice because it expresses the programmers intention better.

There seem to be a lot of complaints raise against generics here - anyone care to give a succinct explanation of (or link to) what those are?

But I’m surprised that noone has mentionned the abomination that is varargs…

Java does seem to be in danger of sliding down the slippery path that C++ has ended up at the bottom of. It is a danger of all languages as they mature. But it’s a tough choice - either keep the original (probably well conceived) feature set and let it stagnate - or pander to the whims of the users (who frankly rarely have a clue about language design). Overall I have to say Sun are doing a reasonable job, probably the best of any recent language standards. I’ve been an observer on X3J3, the Fortran 90 committee which mostly ended up as “what IBM or DEC want, they get” - I’m really glad I never had to implement their braindead attempt at OO. And I’m very grateful not to have anything to do with the C++ committee as every little wish seems to end up being granted.

Dave