mcpiroman
01/10/2023, 1:48 PMInt
, UInt
, Long
, Short
, Float
, Double
2️⃣ Rust-like: I32
, U32
, I64
, I16
, F32
, F64
3️⃣ Mixed: Int32
, UInt32
, Int64
, Int16
, Float32
, Float64
🧵 Other?mbonnin
01/10/2023, 1:56 PMmbonnin
01/10/2023, 1:57 PM32
and 64
so 2️⃣ or 3️⃣jw
01/10/2023, 2:05 PMKlitos Kyriacou
01/10/2023, 2:11 PM0..65535
, for instance, and the compiler decides how many bits to use.Sam
01/10/2023, 2:14 PMKlitos Kyriacou
01/10/2023, 2:20 PMkevin.cianfarini
01/10/2023, 2:32 PMi32
and u8
if we could ensure they wouldn’t be boxed into an object type. Since Kotlin blurs those lines I think I32
and what not would make more sense.
That’s my atrophied Java knowledge speaking though.christophsturm
01/10/2023, 4:14 PMjw
01/10/2023, 4:15 PMjw
01/10/2023, 4:15 PMSam
01/10/2023, 4:17 PMchar
can get in the seachristophsturm
01/10/2023, 4:19 PMint
, long
and float
would be better, where float
would be a floating point number with double precision.jw
01/10/2023, 4:20 PMHalfInt
, Int
, DoubleInt
and HalfFloat
, Float
, and DoubleFloat
.jw
01/10/2023, 4:23 PMQuadrupleInt
, `OctupleInt`(?), and whatever 16 is... but these aren't super friendly compared to Int128
, Int256
, and Int512
which retain their shortness, ability to auto-complete based on the type kind prefix, and aren't a huge leap to learn what the value means.ilya.gorbunov
01/10/2023, 6:21 PMInt256
a 256-bit int or an int that can hold 256 values, i.e. a byte? 🦖kevin.cianfarini
01/10/2023, 6:25 PMInt9223372036854775807
to represent a signed 64bit number so I feel like it would make more sense to denote bitwidth.kevin.cianfarini
01/10/2023, 6:26 PMKlitos Kyriacou
01/10/2023, 6:30 PMdeclare myIntVariable pic '999999999'
?
I'll get my coat...christophsturm
01/10/2023, 7:06 PMjw
01/10/2023, 7:07 PMephemient
01/10/2023, 8:18 PMInt
is fine for "this is the most common integral type". the other Java-like names… eh, less great but we're used to them alreadyephemient
01/10/2023, 8:21 PMCInt
etc. types or aliases for interop with C (can't use <http://kotlin.Int|kotlin.Int>
since C's int
is different sizes on different platforms)ephemient
01/10/2023, 8:22 PMLuke
01/10/2023, 8:25 PMephemient
01/10/2023, 8:31 PMInt
on your current target, this code that assumes they're the same will fail to compile on a target where it aliases `Long`" and it's a ugly painilya.gorbunov
01/10/2023, 8:38 PM