You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Some functions need to decide on how to proceed depending on the type of an argument. If adaption is used, then this would usually imply that if the type is not known, then adaption should be attempted. A problem arises if the argument is adaptable to multiple of the expected types. If the function has a clear favourite type, then it can just call adapt with that type and if that fails, continue with the next type. But if the function does not have a clear favourite, then we'd want to get the adapter that is most specific to the incoming argument i.e. the shortest adaption chain. Currently, there is neither an API that allows one to determine the adaption chain length (it's hidden in AdaptionManager._adapt), nor does that function allow to ask for an adapter to a set of protocols.
The text was updated successfully, but these errors were encountered:
Some functions need to decide on how to proceed depending on the type of an argument. If adaption is used, then this would usually imply that if the type is not known, then adaption should be attempted. A problem arises if the argument is adaptable to multiple of the expected types. If the function has a clear favourite type, then it can just call
adapt
with that type and if that fails, continue with the next type. But if the function does not have a clear favourite, then we'd want to get the adapter that is most specific to the incoming argument i.e. the shortest adaption chain. Currently, there is neither an API that allows one to determine the adaption chain length (it's hidden inAdaptionManager._adapt
), nor does that function allow to ask for an adapter to a set of protocols.The text was updated successfully, but these errors were encountered: