Akuli / jou

Yet another programming language
MIT License
12 stars 4 forks source link

Rename long to int64? #515

Open Akuli opened 2 months ago

Akuli commented 2 months ago

C has long that is 32 bits on Windows and 64 bits on many other platforms. Jou has long which is always 64 bits. This causes confusion when combining C code with Jou code. That's bad, because working with C is a very important feature in Jou.

I think Jou long should be renamed to int64. @littlewhitecloud What do you think?

littlewhitecloud commented 2 months ago

C has that is 32 bits on Windows and 64 bits on many other platforms. Jou has which is always 64 bits. This causes confusion when combining C code with Jou code. That's bad, because working with C is a very important feature in Jou.long``long

I think Jou should be renamed to . @littlewhitecloud What do you think?long``int64

It's up to you :) Other programming language (rust?) seems use names like this too (i64 i32)

Akuli commented 2 months ago

I don't want Jou to use i32 because Python programmers know int, and int is almost always 32 bits nowadays.

Akuli commented 3 weeks ago

I think integer types should be:

bits signed unsigned
8 int8 byte
16 int16 uint16
32 int uint
64 int64 uint64

Advantages:

Disadvantages:

I don't want to use signed byte because then signed byte is the only type with a two-word name.

I don't want to use uint8 because then every Jou beginner would ask "is that a byte?".

As already mentioned, I want to use int (not int32) because people are used to it.

As described in this issue, I don't want to use long, because C's long is 64-bit on linux but only 32 bits on Windows.