this post was submitted on 07 May 2025
0 points (50.0% liked)

Swift

414 readers
1 users here now

This group focus on the content related to the development of Apple Eco-system software. So feel free to share and talk about, for example;

founded 2 years ago
MODERATORS
 

In everyday life we constantly convert values between different units of measurement. For developers this seems easy—write a few formulas, sprinkle in a couple of switch statements and you’re done. But the moment you try to support dozens of units, seamless internationalisation, formatting, precision and rounding, the workload sky-rockets and the drudgery can make you question your life choices. The good news: starting with iOS 10 Apple added a comprehensive Measurement API to Foundation, taking all that “donkey work” off our hands. This article walks you through its usage and best practices.

you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 0 points 4 days ago (1 children)

I'd just go with standard international units and let that one country be

[–] [email protected] 1 points 1 day ago (1 children)

The article is more about the strengths of the type system than a single country's quirks. While I don't disagree with you, I have to ask...you read the article, right?

[–] [email protected] 1 points 1 day ago

I mostly work with C# and love java. This looks like standard stuff from a decade ago