Hiding elements from the implicit context #1840
tothambrus11
started this conversation in
Language design
Replies: 1 comment
|
This feature has been considered in the theoretical model but its interest has yet to be demonstrated in a concrete setup. |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
The implicit context of a scope can contain implicit values (and trait conformances, which are also regular values). We can add something to the implicit context by declaring a
givenor a scoped conformance.It may be also useful to hide something from the implicit context rather than overriding it. E.g. in the current scope I may want to disallow deinitialization of a particular type.
This may or may not be useful in practice but seems like an obvious generalization. Do you foresee any implications of this feature?
All reactions