Wednesday, April 30, 2008

Java 7

Alex Miller - Java 7

The above link describes several possible features of the new Java 7 platform coming out God knows when. There are a great many ideas out there, and I feel it necessary to comment on some of these. Starting at the top.

JSR 294 Improved Modularity Support (superpackages)
I think something like this is always a good thing. I don't know how it's going to be implemented, but it seems like it's going to be part of the JAR manifest. Neat idea.

JSR 277 Java Module System
Anything to aid deployment of a Java application is a good thing in my book. (I should probably read up on Web Start.)

Java Kernel
It's still on this page, and it doesn't need to be. I laugh.

JSR 203 NIO2
I've wanted to write my own Java Zip utility (including TAR functionality) in 100% Java, and it's not easy to do that without access to file attributes. I'm a little leery about escaping to filesystem-specific APIs, as that breaks run-anywhere paradigm. But everything else seems good.

JSR 310 Date and Time API
I don't really get this one. While the idea of describing date without time and time without date and having well-defined types for units of hours and such is interesting, it doesn't seem useful enough to justify yet another time system. Maybe it's useful for intervals and durations. I don't get it. Maybe it's just too early to tell and they just haven't finished it yet.

JSR 275 Units and Quantities
This one's really interesting. This can make a lot of scientific programs easier to create. I made a system to describe prescriptions and did something like this, but this might make things easier. I'd like to know how precise the conversions would be. If they can support BigDecimal as well as double, that would be a good thing.

JSR 107 JCache API
Seems OK to me.

JSR 166 Concurrency Utilities
I'm always in support for improving something that's already good and useful to make it even more useful. There's probably going to be new queue concepts and implementations going in there for a while so that every useful possibility is allowed. Plus, I think this would support multi-processors better, too.

JSR 225 XQuery API for Java
XML good.

JSR 284 Resource Consumption Management API
It's got to be useful for someone.

Miscellaneous Library Changes
Huh?

JSR 296 Swing Application Framework
Yay! Now if we can get everyone passed this misconception that Java is slow.

JSR 295 Beans Binding, JSR 303 Beans Validation
I don't know enough about Beans, but I probably should.

Java Media Components
About time!

JSR 255 JMX 2.0, JSR 262 Web Services Connector for JMX
It's enterprise something or other. I dunno.

JSR 260 Javadoc Technology Update
I think it's a good thing... I don't know though.

Reified Generics
I don't think I like the idea of making code not compatible with older modules running in a newer JVM, especially if it's something in the language that would cause this incompatibility.

Type Literals
Yes. Why isn't it? Well, it's implementation class "Class" is generified... If it's not done, maybe they think it's overkill. I don't think it is.

JSR 308 Annotations on Java Types
This is a really interesting idea. I like it.

Type inference
This seems to be a way to support lazy programming. I don't like lazy programming.

Closures
I do not like this idea. You're creating a completely new programming paradigm within a well established language. I'm not sold on the idea. The problem isn't well defined, and the solution is even less so. It seems that it's a bunch of people who like their old language and want to turn Java into it.

Automatic Resource Block Management
Anything to improve resource management in the JVM is good. Not saying it's bad, but if there's room for improvement, it should be filled.

Language level XML support
Bad idea. It's introducing another language into Java. I hate that paradigm. I have to deal with Objective C enough, I don't want two syntaxes in one language.

JavaBean property support
Another example of people wanting to turn Java into their language du jour. This is Java, not C#.

BigDecimal operator support
If Strings didn't have an overloaded operator, I'd say no. But since it does, there's precedent. The method calls already exist for everything, I'm pretty sure, so the implementation wouldn't be bad. But do we want to overload more operators into Java? The String + operator isn't exactly what we call "clean" anyway.

Strings in switch statements
It could work if the switch statement automatically internalizes the variable it's given. But a switch block is defined in terms of primitives, and when you do it with strings, it smacks of pointer logic. I'm kinda ambivalent on this one

Comparisons for enums
I really don't like this. At all. An enumeration is a discrete set of values that don't necessarily have an integer value. They want enums to work like they work in C, and there's a reason why they don't.

Chained invocation
Another example of supporting lazy programming. Void returns nothing, not "this".

Extension methods
Not only lazy programming, but also trying to make Java into something else. This isn't JavaScript.

Improved catch clause
The pipe operator is bitwise or. Using it with classes seems wrong just on its face. The second half doesn't make much sense to me.

invokedynamic
Is the future of the JVM to support multiple languages? I'm not sure if it should be. But if that's where they want to go, so be it.

Tiered Compilation, G1 Garbage Collector
I like enhancements to the JVM.

More Script Engines
Sure!

Tuesday, April 08, 2008

Al-Sadr going nuts

Al-Sadr threatens to end cease-fire - Yahoo! News

I'm not sure what he's doing, but it's starting to concern me.

The media has been fubar for quite some time over Iraq. A little bit after al-Maliki had began a campaign to stop the militias and al-Sadr told his "troops" to back down, the media claimed that weakened al-Maliki! I don't know how that worked out, but it seems that they're not going to recent that "assessment" in light of what's going on now. Al-Maliki has threatened to bar al-Sadr from the political process if he kept his militia going, which would be politically devastating to al-Sadr, since all he'd have is a militia that he can no longer control.

But now, he's called off a march that he had scheduled recently, claiming that his followers weren't being allowed to set it up. Personally, I think that he's realizing that he's not going to get the million Iraqis that he was expecting. First off, his damn militia is freaking everyone out in Basra and Baghdad so much that no one wants to even leave their homes; second off, everyone's beginning to realize that they're becoming a nation unto themselves finally. Baghdad is getting some fortitude, finally, and making things better. They're getting themselves out of the specter of being an Iranian puppet—something that no doubt left a bad taste in the mouths of most Iraqis. This is also making Iran ticked off, so they're dumping more of their usual military arsenal into the rogue militias that al-Sadr claims to control.

Unless I'm completely off-base, I think we're seeing the end of al-Sadr and the beginning of a fully independent and strong democratic Iraq, in spite of the efforts to do otherwise, both in Iran and Congress.

Truthiness revealed

Clinton's tale part truth, part errors - Yahoo! News

I think it's official, though, that "truthiness" isn't a real word, but it really seems to accurately describe what Clinton seems to be doing in her speeches. She's got caught again with "embellishing" the "truth" to the point that it becomes an outright fabrication. Not too long ago, she was discussing how brave she was exiting a chopper under sniper fire in Bosnia when absolutely nothing of the sort even came close to happening. Now, she is being dinged AGAIN with a story about a pregnant woman who was denied care multiple times because she had no health insurance.

The woman whom Clinton was discussing had indeed died and had a stillborn child, but after she was identified by the Washington Post, something that Clinton failed to do, or actually did but decided to continue the lie hoping no one would find out, the hospital acknowledged the case but said that she was never denied care and even had health insurance at the time of her death.

Thing is, she's clinged onto a story that, if it actually occurred, would cause such an uproar in the medical community that we would still be hearing about it. Hospitals do not deny care to those in need. They never have. Hospitals may be businesses and run in rather insane ways, but they are run by doctors. All doctors have the same moral compunctions to aid those who need care. Money be damned. They may lose money, but they've saved a life. That's really what they care about. Clinton's story didn't even hold water on its face.

It's quickly becoming apparent that the only way that she could possibly win the nomination is if she pulls all the crony strings she can pull within her own party and have almost all the superdelegates vote for her, as well as poach the pledged delegates that are going for Obama.