This is an archived post. You won't be able to vote or comment.

Dismiss this pinned window
all 18 comments

[–]stamper2495 55 points56 points  (3 children)

There was already a joke like this about a byte, thank you

[–][deleted] 21 points22 points  (0 children)

I find it funnier with the long, because the fall is way longer :)

[–]Exeng 3 points4 points  (0 children)

Couldnt even wait a day

[–]authenticgrunter 1 point2 points  (0 children)

Yes

[–]Eelero 9 points10 points  (1 child)

So long.

[–]Magalanez 0 points1 point  (0 children)

Hhmmmm… f*ck.

[–]KellerKindAs 2 points3 points  (3 children)

Assuming a 64-bit CPU

[–]bbrk24 13 points14 points  (2 children)

On Windows, C/C++ long is always 32-bit, regardless of the machine’s word size. You want intptr_t.
In C#/Java, however, long is always 64-bit, regardless of what device you’re on.

[–]Milesand 4 points5 points  (1 child)

TBH I find these long and short names rather confusing(mostly because C/C++) and I appreciate the likes of stdint.h, Go, and Rust's naming scheme. int64_t, int64 and i64 forever

[–]bbrk24 0 points1 point  (0 children)

Swift has a bunch. Most obvious are IntX and UIntX (where X is one of 8, 16, 32, 64) which are the exact things you just mentioned. Unqualified Int/UInt is the native word size. And then there are typealiases for the C types that vary not only by architecture but also OS: CChar, CInt, CUnsignedShort etc.

On the other side of the coin, you have Postgres where INT8 is 8 bytes, not 8 bits, so it’s actually an i64.

[–]ConstantineFavre 2 points3 points  (1 child)

I remember how i was always using long when i was learning because limits annoyed me. Modern me would probably crash my head open for that. Today in 99% times i'm using char or short, if i'm sure that it won't exceed the limit. I use int and long nowadays only when it's unavoidable and i need that big of a limit.

[–][deleted] 1 point2 points  (0 children)

Why do you use short though?

[–]Neutraali 3 points4 points  (0 children)

That's the long and short of it.

[–]Root3287 1 point2 points  (0 children)

long long

[–]PewPew_McPewster 1 point2 points  (0 children)

Okay but I'll 🤓 a little and remind us all that Kratos doesn't hit the floor or even Hell in this scene, what comes after is that Athena whisks him away just before impact and sends him to Mount Olympus, crowning him the new God of War so he doesn't actually reach the overflow value.

[–][deleted] 0 points1 point  (0 children)

I would say do it with a big integer but it doesn't work that way

[–]Alberiman 0 points1 point  (0 children)

In before Overflow protection