How long have you got?
In all seriousness, I think the biggest, easiest improvements would be to:
-
Add
.percentEncodedX
properties toURL
, so that people don't need to go throughURLComponents
to avoid URL's automatic percent-decoding. Automatic decoding is really, really, really bad and currently there is no way around it (even convertingURL
->URLComponents
will automatically percent-decode under certain circumstances, and can corrupt the path). -
Add a method which provides the URL's string buffer, with ranges of all of the components. This would be seriously useful for
URL
->WebURL
conversion -- currently, because there are differences between the standards (as well as bugs in URL), we need to request each component individually to ensure the converted URL points to the same location, and each component potentially allocates aString
.
There are more, but I think these 2 would be relatively straightforward and come with some big wins.