5
you are viewing a single comment's thread
view the rest of the comments
[-] lamaxamara@alien.top 1 points 2 years ago

Someone decided to call you after you had 2,147,483,647 missed calls lol

[-] 1994-10-24@alien.top 1 points 2 years ago
[-] AtargatisEmerald@alien.top 1 points 2 years ago

As a software developer, I thought your answer was hilarious.

[-] ArmchairFilosopher@alien.top 1 points 2 years ago

Why use a signed integer for something strictly non-negative (ignoring bugs ofc)?

[-] Zarksch@alien.top 1 points 2 years ago

It doesn’t really make sense especially since other apps like mail just say idk 9999+ at some point (maybe higher or lower, I’m no maniac letting it get there)

[-] Diligent-Reply-6810@alien.top 1 points 2 years ago

It's just rounded down to 9999 in the ui but internally the exact number is still counted

[-] Diligent-Reply-6810@alien.top 1 points 2 years ago

Some developers get lazy and just use an int for everything it's not really a big deal anyway

[-] dont-respond@alien.top 1 points 2 years ago

Ask that question to Java

[-] Any_Association4863@alien.top 1 points 2 years ago

It's always better to use signed for absolutely everything unless you're dealing with a very edge case

[-] rydan@alien.top 0 points 2 years ago

Because it is all written in a language that only has signed numbers. That's virtually all modern languages.

[-] ArmchairFilosopher@alien.top 1 points 2 years ago

Swift (used for Apple devices) has them (see the Integers section):

https://docs.swift.org/swift-book/documentation/the-swift-programming-language/thebasics/

So it was actually written in a language that has them...

C# has them (goes without saying)

Java doesn't seem to.

This is still clearly far from "virtually all."

[-] LB--@alien.top 0 points 2 years ago

Wouldn't it wrap around to -2,147,483,648 though? It'd take nearly four billion calls to get all the way up to -1 if it's signed 32-bit wrap around...

[-] c0nd3v@alien.top 1 points 2 years ago

That’s exactly what I was thinking too

this post was submitted on 14 Nov 2023
5 points (100.0% liked)

Apple

126 readers
5 users here now

A place for Apple news, rumors, and discussions.

founded 2 years ago
MODERATORS