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
I was wondering whether you would be interested in a patch that removed runtime exceptions, opting instead for returning either a boolean, enumeration or some sort of std::optional value to report whether a minimization went well or not.
I am not proposing removing exception related to erroneous parameters (so all std::invalid_arguments make sense for me).
I ask as exceptions can be relatively costly computationally when used as a failure status report, and given that one has no way to know in advance whether the provided inputs will result in failure or not, throwing an exception seems unduly harsh on the caller. In my current usage, for example, I am simply wrapping minimize calls in a try/except block that simply logs failures.
Please let me know if you would be interested in this, and I can try to provide a PR :)
The text was updated successfully, but these errors were encountered:
I was wondering whether you would be interested in a patch that removed runtime exceptions, opting instead for returning either a boolean, enumeration or some sort of
std::optional
value to report whether a minimization went well or not.I am not proposing removing exception related to erroneous parameters (so all
std::invalid_arguments
make sense for me).I ask as exceptions can be relatively costly computationally when used as a failure status report, and given that one has no way to know in advance whether the provided inputs will result in failure or not, throwing an exception seems unduly harsh on the caller. In my current usage, for example, I am simply wrapping
minimize
calls in atry/except
block that simply logs failures.Please let me know if you would be interested in this, and I can try to provide a PR :)
The text was updated successfully, but these errors were encountered: