-
Notifications
You must be signed in to change notification settings - Fork 259
“convert” between gr
status flags and truth_t
values
#2297
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I guess this is probably the reason. For the first one in theory |
Well, it already does — anything with
Sure, the idea is not to replace manually testing status flags or truth values, just to simplify some common cases. |
Sure, it would make sense to have such conversions. This may or may not be implemented in the future, but the set of return flags could conceivably be extended for more granularity. For example, one could have
These would set the So a forward-compatible logic for parsing |
On Sunday, 13 April 2025 Fredrik Johansson wrote:
This may or may not be implemented in the future, but the set of
return flags could conceivably be extended for more granularity.
Speaking of that, what do you think of reserving some bits from the
return flags for use by individual functions?
…--
Marc
|
Do you have a specific use case in mind? |
Yes and no. The other day I wanted to write a function that tried to do a certain computation using an incomplete algorithm and returned |
I have been playing a bit with the generics subsystem and I often find myself wishing for a way to “convert” truth values into status codes and vice-versa. I mean for instance something like
(these are probably the most useful mappings, but not the only ones that make sense).
Was it a deliberate choice not to provide this kind of conversions as standard functions?
The text was updated successfully, but these errors were encountered: