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
Do we really need to return the error codes? On a debug build, they'll be printed out. In release, could you/would you act on those error codes? Probably not. The value returned should indicate if something has gone wrong already, like 0 RPM for a fan speed call.
The text was updated successfully, but these errors were encountered:
In addition to this, another thing to ponder is if to return optional values instead. This would be more Swifty in approach and probably better. For main values (like say fan RPM), nil makes it clear that something has gone wrong, while for error codes, nil would indicate no error (as seen in NSJSONSerialization for example).
Do we really need to return the error codes? On a debug build, they'll be printed out. In release, could you/would you act on those error codes? Probably not. The value returned should indicate if something has gone wrong already, like 0 RPM for a fan speed call.
The text was updated successfully, but these errors were encountered: