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 differenceInWhole... functions should just return Int values. The underlying TimeDifference, because of the nature of the computation, will only have a single represented value, so the extra indirection is unnecessary.
This could be implemented by adding the new Int-returning methods but marking them as @_disfavoredOverload; that would mean existing code would continue to compile without issues and would not require modifications.
Eventually when Time reaches 2.0 status, the @_disfavoredOverload attribute could swap from the Int-returning method to the TimeDifference-returning method, because that's a source/API-breaking change, which is appropriate for a major version update.
The text was updated successfully, but these errors were encountered:
The
differenceInWhole...
functions should just returnInt
values. The underlyingTimeDifference
, because of the nature of the computation, will only have a single represented value, so the extra indirection is unnecessary.This could be implemented by adding the new
Int
-returning methods but marking them as@_disfavoredOverload
; that would mean existing code would continue to compile without issues and would not require modifications.Eventually when Time reaches 2.0 status, the
@_disfavoredOverload
attribute could swap from theInt
-returning method to theTimeDifference
-returning method, because that's a source/API-breaking change, which is appropriate for a major version update.The text was updated successfully, but these errors were encountered: