News for hackers. Stuff that matters.
Re:The problem with new URL(), and how URL.parse() fixes that by nine_k on Monday May 20, 2024 @07:19AM (#40414285)
Without parametric types, your methods grew longer and longer lists in the "throws" clause. It was easy to miss one of the dozen exceptions and only have the compiler point you at it after wasting several minutes on compilation (think 133MHz CPUs and slow HDDs).

Type inference in modern Java makes you forget how long and repetitive type signatures used to be in it 20 years ago.

BTW this makes Result<D, E> more ergonomic anyway: you still have only one E, at least one per invocation level. With checked exceptions, you had to haul a whole garland.

Re:The problem with new URL(), and how URL.parse() fixes that by michaelcampbell on Monday May 20, 2024 @08:16AM (#40414631)
> It was easy to miss one of the dozen exceptions and only have the compiler point you at it

This sounds like (one of?) the killer feature of types, though.

> after wasting several minutes on compilation (think 133MHz CPUs and slow HDDs).

Sure, but everything we did was slow then.

Re:The problem with new URL(), and how URL.parse() fixes that by robertlagrant on Monday May 20, 2024 @08:21AM (#40414670)
I don't remember Java being that slow even on a 133MHz CPU. Maybe if it was a giant project, though.
Re:The problem with new URL(), and how URL.parse() fixes that by nine_k on Monday May 20, 2024 @09:58AM (#40415534)
A large project, and a poor ant config %) Also, small RAM.

Incremental changes were pretty fast though. (Then IDEA came.)