News for hackers. Stuff that matters.
Re:Custom string delimiters in Swift 5 by arcticbull on Saturday December 29, 2018 @12:48PM (#18784745)
Sorta, it's the right choice on iOS and macOS but conceptually filesystem paths are different than URIs even though the same information can be encoded into both. It's weird to have URIs pointing at google (technically valid by means of being the same type) being passed to file-management APIs - only to have them unsurprisingly fail. It subverts the type system by allowing invalid blobs to avoid being caught by the type system. Paths as URIs in contexts where only FS paths are valid is akin to any other stringly-typed API. A third type is more logical: URL, String and FsPath.

There are no comments on this comment yet.