Open Kampfkarren opened 7 years ago
I suggest, since we are lacking in c# attributes, that we use int
, double
, and long
.
Should everything be signed like C#? Or give the option like in C++?
I'd suggest that we give the option, but we should wait for more people's suggestions. (We can, of course, change the specs later.)
IMO everything should be binary or base 65536.
I think we should have C++-style primitive number types:
int
(actually a long)float
(actually a double)uint
(unsigned)ufloat
(unsigned)But then again, I've always liked the idea of fixed-width integer types. i
prefixes signed ints, u
prefixes unsigned ones, and then you put the width in bits, so:
i8
is like C(++)'s signed char
.u64
is like C(++)'s unsigned long long
.i32
is like C(++)'s int
(on most platforms).But none of our inspiration languages do this (except C(++)'s xintxx_t
types, but they're typedef
ed in stdint.h
).
IIRC IL (the intermediate language C# compiles to) has Int32, Int16, Int64, etc.
Is there just a basic
number
type? Is it like C(++) withlong
,double
,int
, etc? Is theresigned
andunsigned
? Can you add "f" to the end of a number to treat it like a float? Is there hexadecimal support? Octal? Binary? When you type a number on its own, what type is it treated as? These are great topics for a specification if we can all agree on the details.