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
There's currently no way to match a function unless they are bound to a new variable, meaning they can't appear as the subject of a match value. Should we consider a sort of identity comparison for function values, in other words synthesizing = for functions?
This would allow us to write things like:
match (func () -> Int :: 1)
with (func () -> Int :: 1) :: "the function matched!"
//
If such synthesized equality operator was to be implemented, should function with the same signature be considered equal, or should equality also encompass function identifiers and/or body?
The text was updated successfully, but these errors were encountered:
There's currently no way to match a function unless they are bound to a new variable, meaning they can't appear as the subject of a match value. Should we consider a sort of identity comparison for function values, in other words synthesizing
=
for functions?This would allow us to write things like:
If such synthesized equality operator was to be implemented, should function with the same signature be considered equal, or should equality also encompass function identifiers and/or body?
The text was updated successfully, but these errors were encountered: