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
So, any is a good (slightly better in my opinion) name than thereis. I made thereis modeling the specification of the iteratethereis clause. However, it contrasts from never and always in that it actually returns a value. Maybe, to be consistent the behavior with always and never, an any clause should strictly return a boolean.
I don't know whether this is overkill or not, but I could whip up a PR with alwaysisneveris clauses which contrast with their counterparts in that they return values as opposed to booleans.
The text was updated successfully, but these errors were encountered:
So, any is a good (slightly better in my opinion) name than thereis. I made thereis modeling the specification of the iteratethereis clause. However, it contrasts from never and always in that it actually returns a value. Maybe, to be consistent the behavior with always and never, an any clause should strictly return a boolean.
In loop, the always and never commands return only t or nil, but in iterate, they also return the values of the condition.
If the inconsistency bothers you, it is probably good to switch from the loop behavior to the iterate behavior.
I don't know whether this is overkill or not, but I could whip up a PR with alwaysisneveris clauses which contrast with their counterparts in that they return values as opposed to booleans.
I think that it would be overkill. Generally, a non-nil value works as well as t for checking a condition. Indeed, I learned of t as just a shorthand for "non-nil", as opposed to a needed specific value.
If one is relying on a difference between t and other non-nil values, then one could use the return command to return the correct value. An always (or never) command that returns a non-nil value (not just t) can already cover almost all use cases.
So, any is a good (slightly better in my opinion) name than thereis. I made
thereis
modeling the specification of theiterate
thereis
clause. However, it contrasts fromnever
andalways
in that it actually returns a value. Maybe, to be consistent the behavior withalways
andnever
, anany
clause should strictly return a boolean.I don't know whether this is overkill or not, but I could whip up a PR with
alwaysis
neveris
clauses which contrast with their counterparts in that they return values as opposed to booleans.The text was updated successfully, but these errors were encountered: