Changes between Version 1 and Version 2 of Ticket #16995, comment 18
- Timestamp:
- 2018-11-23T11:04:46+01:00 (7 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #16995, comment 18
v1 v2 1 1 @Don-vip: Yes, the preferred solution may need update of some plugins (if they write {{{String}}} object to {{{GpxConstants.PT_TIME}}} attribute of {{{WayPoint}}}). On the other hand, using a fixed data type for that attribute will lessen the maintenance burden in the future. It also makes behavior of {{{WayPoint}}} more predictable in terms of memory consumed. 2 2 3 Leaving that data type to be disambiguous may seem convenient when instantiating/writing {{{WayPoint}}} objects, but is less so when using/reading them: That ternary operator currently living in {{{setTimeFromAttribute}}} basically cries out to be copied to each and every place that the attribute is used/read (unless you have a unit test that only tests half of the possibilties). 3 Leaving that data type to be disambiguous may seem convenient when instantiating/writing {{{WayPoint}}} objects, but is less so when using/reading them: That ternary operator currently living in {{{setTimeFromAttribute}}} basically cries out to be copied to each and every place that the attribute is used/read (unless you have a unit test that only tests half of the possibilities). 4 4 5 5


