It was only after that that I realized what a total mess I made of things by naming them in what I perceived at the time to be a logical, sensible way.
Package names need to be clear and specific, yes, but they should avoid terms that will overlap because when you have a package called SwiftString and every Bob, Jane, and Harry also has a package called SwiftString, name collisions are inevitable.
SwiftString.doSomethingMeaningfulWithAString() is indistinguishable from everyone else’s
SwiftString.doSomethingMeaningfulWithAString(). At this time there is no built-in way that I know of how to deal with module name collisions.
Future solutions might include some way to introduce further namespacing. For example, the Package declaration syntax might add an origin:
import PackageDescription let package = Package( name: "SwiftString" origin: "com.sadun" )
With this, you could avoid name conflicts with
import com.sadun.SwiftString import com.LeeJason.SwiftString
For obvious reasons, this could get a little annoying, although if you only import one of the two SwiftString packages, you wouldn’t have to go nearly that far with the disambiguation.
At this time, there aren’t public, blessed, or official repositories of SPM packages but you know this is going to self-organize fairly soon if history is an example. Making sure there’s a clear way to use multiple, potentially overlapping packages will be a good thing.
And, until then, prefer
SwiftString and avoid the issue from the start.