Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

Type safe duration vs long to avoid unit bugs #8595

Closed
tobrun opened this issue Mar 31, 2017 · 1 comment
Closed

Type safe duration vs long to avoid unit bugs #8595

tobrun opened this issue Mar 31, 2017 · 1 comment
Labels
Android Mapbox Maps SDK for Android

Comments

@tobrun
Copy link
Member

tobrun commented Mar 31, 2017

Follow up from #8576 where both @jfirebaugh as @ivovandongen suggested to look into using an object for duration instead of a long. This allows us to centralize converting logic and avoid any future unit conversion bugs due to type safety.

If we force usage of this in the public API, this would be a SemVer change. We can also opt to gradually migrate to it (leave long for public api and do a conversion to a Duration underneath until next major release).

@tobrun tobrun added the Android Mapbox Maps SDK for Android label Mar 31, 2017
@tobrun
Copy link
Member Author

tobrun commented Jan 18, 2018

After some internal discussion, we are going to punt on using long for now. This matches the end deveoper expectations the most as Android platform code also uses long for duration.

cc @LukasPaczos

@tobrun tobrun closed this as completed Jan 18, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Android Mapbox Maps SDK for Android
Projects
None yet
Development

No branches or pull requests

1 participant