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