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
I request a notation for method overload narrowing, such that subtype args narrow supertype args.
The intent is so the return type of supertype overloads not longer need to explicitly include those of narrower overloads.
This new solution enables us to type the result for truthy args without needing a “difference type” type truthy = top - false?.
In fact, this is possibly the only practical use case for “difference types”.
I’ve considered moving this focus to Steep but decided that the entire RBS ecosystem could use this.
For example, #1874 (comment) finally encouraged me to formally file this issue.
Though it is backward-incompatible to change the semantics of | set by yore, we can instead introduce an new, alternative syntax, such as the tokens:
I request a notation for method overload narrowing, such that subtype args narrow supertype args.
The intent is so the return type of supertype overloads not longer need to explicitly include those of narrower overloads.
E.g.,
TrueClass#&
example from prior brief discussion on Discord:Contrast with our current compromise:
rbs/core/true_class.rbs
Lines 28 to 29 in 45b34bd
This new solution enables us to type the result for truthy args without needing a “difference type”
type truthy = top - false?
.In fact, this is possibly the only practical use case for “difference types”.
I’ve considered moving this focus to Steep but decided that the entire RBS ecosystem could use this.
For example, #1874 (comment) finally encouraged me to formally file this issue.
Though it is backward-incompatible to change the semantics of
|
set by yore, we can instead introduce an new, alternative syntax, such as the tokens:&
(from Suggestion: how about&
for overloaded method type separator, instead of|
? #566):
(from the aformentioned Discord discussion)||
The text was updated successfully, but these errors were encountered: