[swift-evolution] (core library) modern URL types
kelvin13ma at gmail.com
Sun Aug 20 23:37:51 CDT 2017
Okay so a few days ago there was a discussion
about getting pure swift file system support into Foundation or another
core library, and in my opinion, doing this requires a total overhaul of
the `URL` type (which is currently little more than a wrapper for NSURL),
so I’ve just started a pure Swift URL library project at <
The library’s parsing and validation core (~1K loc pure swift) is already
in place and functional; the goal is to eventually support all of the
Foundation URL functionality.
The new `URL` type is implemented as a value type with utf8 storage backed
by an array buffer. The URLs are just 56 bytes long each, so they should be
able to fit into cache lines. (NSURL by comparison is over 128 bytes in
size; it’s only saved by the fact that the thing is passed as a reference
As I said, this is still really early on and not a mature library at all
but everyone is invited to observe, provide feedback, or contribute!
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the swift-evolution