Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

The class isn’t called URL, it’s called URLPattern. Because it represents a pattern that URLs can be matched against.


I was aware of the first part though I foolishly assumed by the name that it was designed specifically to work with the existing URL object. I then experienced a bout of Java PTSD.

Upon further analysis of the full API, it's not as bad as I initially thought.

My initial reaction was kind of surface-level eye-rolling "Oh no, don't tell me they managed to find a way to make URL parsing even more complicated than it needs to be."

But in a way, this is almost an attempt at rolling back the previous complexity introduced by the URL instance and acknowledging the utility of the URL as a string primitive.

It is additional complexity but I guess at least it might prevent the need for additional future complexity.

I hope that's the idea.




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: