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
Specifically, we need an RFC for new syntax that can be used in a type parameter constraint to require that the type parameter is safe to put in a match expression against some other type.
So, for ListNode, it might look like this (with a more elegant syntax):
classListNode[A: canbematchedagainst None]
This would imply that a match expression containing the right-side operand type and the type argument would not be subject to the error "this match violates capabilities".
The text was updated successfully, but these errors were encountered:
Pointing out that I’m positing in #2182 that the problem might be more fundamental in the design choices for Pony’s type system. And that adding “hacks” for corner cases caused by design choices is probably not going to end well. If my hypothesis is correct, then perhaps redesigning Pony’s type system from the ground up is the real solution.
As discussed on today's sync call, due to @Theodus finding a standard library breakage in the planned fix for https://github.com/ponylang/ponyc/issues/2182#issuecomment-335878405, I think that adding syntax to our constraint language to fix that issue is a higher priority than previously thought.
Specifically, we need an RFC for new syntax that can be used in a type parameter constraint to require that the type parameter is safe to put in a match expression against some other type.
So, for
ListNode
, it might look like this (with a more elegant syntax):This would imply that a match expression containing the right-side operand type and the type argument would not be subject to the error "this match violates capabilities".
The text was updated successfully, but these errors were encountered: