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
For the most part, Island Time detects and throws an exception on overflow, like java.time does. The unit classes are a bit inconsistent in that they aren't overflow safe by default.
Internally, we have plusExact and minusExact infix functions to do overflow safe math. The question is whether or not these should be the default and instead, require a plusWithOverflow, minusWithOverflow, or inMinutesWithOverflow. I'm leaning "yes", but curious to hear if others have an opinion on this.
On native, it seems like LLVM's UBSan could be used to detect overflow during debug as a possible alternative, though not sure if enabling it is possible with Kotlin Native. Doesn't help with JVM though, obviously.
The text was updated successfully, but these errors were encountered:
For the most part, Island Time detects and throws an exception on overflow, like java.time does. The unit classes are a bit inconsistent in that they aren't overflow safe by default.
Consider IntHours:
Internally, we have
plusExact
andminusExact
infix functions to do overflow safe math. The question is whether or not these should be the default and instead, require aplusWithOverflow
,minusWithOverflow
, orinMinutesWithOverflow
. I'm leaning "yes", but curious to hear if others have an opinion on this.On native, it seems like LLVM's UBSan could be used to detect overflow during debug as a possible alternative, though not sure if enabling it is possible with Kotlin Native. Doesn't help with JVM though, obviously.
The text was updated successfully, but these errors were encountered: