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
Partial-evaluation residuals currently exhibit many missed opportunities for constant-folding, e.g., true && and && true in many positions. In some cases, true && or && true cannot be safely eliminated, e.g., if we don't know that the other side will evaluate to Boolean-or-error. (E.g.: 3 && true cannot be safely reduced to 3, as the former expression will error and the latter will not.) But there are still cases where we could constant-fold and do not today. In particular, nested occurrences of a && true && true should be always OK to simplify to a && true at a minimum. Generalizing this, there are many AST nodes we know must always return Boolean-or-error (&&, ||, .contains(), etc), and for all of these, we can eliminate true && or && true.
Describe alternatives you've considered
Status quo has the same semantics. This is mainly a readability issue for residuals.
Additional context
No response
Is this something that you'd be interested in working on?
👋 I may be able to implement this feature request
⚠️ This feature might incur a breaking change
The text was updated successfully, but these errors were encountered:
Category
User level API features/changes
Describe the feature you'd like to request
Partial-evaluation residuals currently exhibit many missed opportunities for constant-folding, e.g.,
true &&
and&& true
in many positions. In some cases,true &&
or&& true
cannot be safely eliminated, e.g., if we don't know that the other side will evaluate to Boolean-or-error. (E.g.:3 && true
cannot be safely reduced to3
, as the former expression will error and the latter will not.) But there are still cases where we could constant-fold and do not today. In particular, nested occurrences ofa && true && true
should be always OK to simplify toa && true
at a minimum. Generalizing this, there are many AST nodes we know must always return Boolean-or-error (&&
,||
,.contains()
, etc), and for all of these, we can eliminatetrue &&
or&& true
.Describe alternatives you've considered
Status quo has the same semantics. This is mainly a readability issue for residuals.
Additional context
No response
Is this something that you'd be interested in working on?
The text was updated successfully, but these errors were encountered: