Unpopular opinion: i64, int64_t, Int64 and similar types should be named according to their actual meaning, Ring64.

Even better, all programming languages should have a Ring[N] type that provides unit, zero addition and multiplication over a domain of N-bit strings, with the compiler applying proper optimizations when available (and requested).

@Shamar int64_t is not allowed to overflow, so it is not a ring. If you rearrange/transform formulas according to rules of a ring you might break something that was carefully crafted to not overflow.
uint64_t however is a finite field.

Ring could be a useful concept (type requirement), but so many things can be rings that as a specific type it's meaningless.

Follow

@Shamar no wait, division breaks it, so unsigned integers aren't quite finite fields. Still rings I guess, better than nothing, but not sufficient for all use cases.

Sign in to participate in the conversation
CleverLibre Social

CleverLibre Social is an inclusive social instance for open discussion, learning, and community.
All cultures welcome.
Hate speech and harassment strictly forbidden.