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
The stance is that interfaces should be designed around the philosophy that all API calls do not need to concern themselves with preconditions before being called. The API call may not behave has the user may have wanted but it will work with the conditions it currently has.
For example, if you call hal::spi::transfer and you forgot to set the clock rate, transfer wills till work, but it will use a slower clock rate. This is fine. transfer does not have any preconditions, just that the configuration is undefined from the point of view of the application and depends on what it configures at the start.
Any API that requires preconditions should be closely evaluated and a means to make the API no longer have a precondition should be sought out. We cannot avoid preconditions everywhere, but we should try to.
I'm conflicted on how this will work for networking. And I'll just leave that comment for now.
The text was updated successfully, but these errors were encountered:
The stance is that interfaces should be designed around the philosophy that all API calls do not need to concern themselves with preconditions before being called. The API call may not behave has the user may have wanted but it will work with the conditions it currently has.
For example, if you call
hal::spi::transfer
and you forgot to set the clock rate, transfer wills till work, but it will use a slower clock rate. This is fine.transfer
does not have any preconditions, just that the configuration is undefined from the point of view of the application and depends on what it configures at the start.Any API that requires preconditions should be closely evaluated and a means to make the API no longer have a precondition should be sought out. We cannot avoid preconditions everywhere, but we should try to.
I'm conflicted on how this will work for networking. And I'll just leave that comment for now.
The text was updated successfully, but these errors were encountered: