Elliott C. Back: In Aere Aedificare

PANIC MODE JAVA

Posted in Computers & Technology, Code, Law, Java by Elliott Back on November 29th, 2005.

I’ve decided that Sun Micrososystems has screwed up with Java. See, they have a great API, but every now and then you find some kind of inconsistency that really makes you wonder “WHY.” For example, things in real life which can be compared to each other generally ought to implement the Comparable interface in Java so that you can compare them as objects. However, java . net . URL doesn’t implement Comparable, and therefore I am forced to conclude that a Uniform Resource Locator is fundamentally un-comparable. Except that it’s not. Every search engine has figured out how to handle URLs, but for some reason Java hasn’t.

Let me give you a hint–it’s not too hard. Just compare the protocol, the domain, and the paths. Then compare the query string. Of course there can be aliasing of all kinds on the server side, but couldn’t you lazy programmers at least have tried something?

This entry was posted on Tuesday, November 29th, 2005 at 11:00 pm and is tagged with uniform resource locator, lazy programmers, reason java, query string, panic mode, inconsistency, server side, api, hasn, protocol, interface, search engine, sun. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback.

2 Responses to 'PANIC MODE JAVA'

  1. inaequitas said:

    on November 29th, 2005 at 11:27 pm

    Well instead of bitching about it you’d find some elegant way of working besides it.

    So going further on into toURI and toString tells you that both URI and String are Comparable. Issue ends here.

    So maybe they weren’t so lazy after all. Given that, you know, they did Java.

  2. Elliott Back said:

    on November 29th, 2005 at 11:40 pm

    Oh, it’s easy enough to work with. But a URI is not exactly a URL, so they should have built this funcationality in. And I’m allowed to ***** if I want to ;)

Your Thoughts Go Here:

Powered by WP Hashcash