Closed thebarndog closed 8 years ago
You've got it exactly right. It's mostly for API clarity and differentiating between Element types. Examples always feel a bit contrived, but yours captures it just fine. An API, Github link and a support link could all be NSURL and you would have to differentiate between them.
That makes perfect sense, thanks!
This framework is fantastic but the one thing I can't wrap my head around is
In the example:
and
are equivalent to:
Provider<UINavigationController>
instead ofTaggedProvider<UIViewController.Root>
.tagged(with: UIViewController.Root.self)
What would the advantage of using tags be in this situation? Is it solely for API clarity?
Continuing with the api url example used in the readme, I constructed some possible use cases for tags (as I understand them):
Is that a correct usage of tags? It seems a bit contrived, distinguishing between plain
NSURL
instances but I can see there being a value in tagging more complex classes.