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
Consider adding generalized support for error lifting. Error lifting for an operator means that if an operand evaluates to an error e, then the result of the operation is e.
Some initial thoughts:
Subtle difference to lax typing of error in that lifted operator that gets an error operand will return that error rather than create a new error.
If operands do not allow errors and result of operation can never be an error, then should be safe to do lifting automatically. Otherwise might need to be explicit.
Rather than doing this operator by operator, feels like something that should have a general solution. (For example, solution might look like contextually expected type: syntax that establishes a context in which errors get lifted.)
Generalized error lifting (which leverages error being a distinct type) would be a significant step towards reducing the awkwardness that comes from using explicit error handling rather than exceptions
Not a good idea for lang.* functions to try and do it manually, because it is hard to get precise typing of error values.
Related to lax typing in that when you really want to lift errors when you are doing lax typing.
Feels like something generally useful.
The text was updated successfully, but these errors were encountered:
Consider adding generalized support for error lifting. Error lifting for an operator means that if an operand evaluates to an error e, then the result of the operation is e.
Some initial thoughts:
The text was updated successfully, but these errors were encountered: