Ordinary-Review730@alien.topB to Apple@hardware.watchEnglish · 1 year agowhat does it mean 💀alien.topimagemessage-square267fedilinkarrow-up15arrow-down10
arrow-up15arrow-down1imagewhat does it mean 💀alien.topOrdinary-Review730@alien.topB to Apple@hardware.watchEnglish · 1 year agomessage-square267fedilink
minus-squarelamaxamara@alien.topBlinkfedilinkEnglisharrow-up1·1 year agoSomeone decided to call you after you had 2,147,483,647 missed calls lol
minus-squareArmchairFilosopher@alien.topBlinkfedilinkEnglisharrow-up1·1 year agoWhy use a signed integer for something strictly non-negative (ignoring bugs ofc)?
minus-squareDiligent-Reply-6810@alien.topcakeBlinkfedilinkEnglisharrow-up1·1 year agoSome developers get lazy and just use an int for everything it’s not really a big deal anyway
minus-squareZarksch@alien.topBlinkfedilinkEnglisharrow-up1·1 year agoIt 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)
minus-squareDiligent-Reply-6810@alien.topcakeBlinkfedilinkEnglisharrow-up1·1 year agoIt’s just rounded down to 9999 in the ui but internally the exact number is still counted
minus-squareAny_Association4863@alien.topBlinkfedilinkEnglisharrow-up1·1 year agoIt’s always better to use signed for absolutely everything unless you’re dealing with a very edge case
minus-squarerydan@alien.topBlinkfedilinkEnglisharrow-up0·1 year agoBecause it is all written in a language that only has signed numbers. That’s virtually all modern languages.
minus-squareArmchairFilosopher@alien.topBlinkfedilinkEnglisharrow-up1·1 year agoSwift (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.”
minus-squareAtargatisEmerald@alien.topBlinkfedilinkEnglisharrow-up1·1 year agoAs a software developer, I thought your answer was hilarious.
minus-squareLB--@alien.topBlinkfedilinkEnglisharrow-up0·1 year agoWouldn’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…
minus-squarec0nd3v@alien.topBlinkfedilinkEnglisharrow-up1·1 year agoThat’s exactly what I was thinking too
Someone decided to call you after you had 2,147,483,647 missed calls lol
Why use a signed integer for something strictly non-negative (ignoring bugs ofc)?
Some developers get lazy and just use an int for everything it’s not really a big deal anyway
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)
It’s just rounded down to 9999 in the ui but internally the exact number is still counted
Ask that question to Java
It’s always better to use signed for absolutely everything unless you’re dealing with a very edge case
Because it is all written in a language that only has signed numbers. That’s virtually all modern languages.
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.”
Found the nerd
As a software developer, I thought your answer was hilarious.
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…
That’s exactly what I was thinking too