Clarification on the Use of `Id` vs `Self` in `Context.Tag`
Could someone explain the relationship between
Id and Self for Context.Tag please? From my understanding, the
Id is used as the key to resolve the value/implementation of Shape from the Context Why is
Self ie. the class that extends Context.Tag (S1 or S2 in the screenshot) not used as the key instead?Assuming
Context is some kind of JS Map under the hood, anything could be used as the key including the class itself ie.This would circumvent the need for unique string identifiers and the issue shown in the screenshot where duplicate IDs ("S1" in the example) for different services (eg.
S1 and S2) with different interfaces/shapes resolve to whichever implementation is provided first to the Context
