3 ms·
I agree! I get that it's easy to critique in hindsight but it's clear that they eventually solved this sort of thing well via the Comparable/Comparator relation
by kjeetgill 7y ago
I agree! I get that it's easy to critique in hindsight but it's clear that they eventually solved this sort of thing well via the Comparable/Comparator relationship.
It's less an issue so I get why it's been backlogged, but it's one that I'd love to see worked out.
- ben509 7y agoWhat's frustrating in hindsight is they knew the URL class was obviously terrible, but never made a serious effort to stop people using it. I'm fine with not breaking old jars, but they could have made newer javac's by default die with a notice "use -legacy to build this". Same thing with Date, Vector, all the broken thread semantics, you name it. These classes should have been relegated to a handful of ancient jars, they shouldn't keep popping up in modern Java because newbies have to learn a whole host of classes they aren't supposed to use.
- kjeetgill 7y agoI sorta agree when in comes to Vector and some of the Thread stuff, but URL is only broken in gethashcode() and equals(). The rest of the class is perfectly fine. It's a great simple curl that takes you pretty far before you reach for a real http client lib.