dinfuehr / dora

Dora VM
MIT License
490 stars 31 forks source link

Change type of default integer literal from `Int32` to `Int64` #261

Closed soc closed 2 years ago

soc commented 3 years ago

See https://github.com/dinfuehr/dora/issues/49#issuecomment-907657650.

This makes it consistent with floating point literals.

dinfuehr commented 3 years ago

Agreed, this makes a lot of sense. Btw what do you think about our suffixes we use for our integer literals? We currently use L, I and Y, F and D which all come from the old primitive type names. IMHO it would make sense to change this as well, to use e.g. 100i32 or 100int32.

soc commented 3 years ago

Agreed! I was kinda hoping for a more concise solution, but I think this is the best we can do.

(A bit less concise would be to use type ascriptions instead of custom syntax, so a 32bit integer would be 123: Int32, but that opens all kind of fundamental questions again, so I didn't pursue this direction.)

Perhaps it makes sense to collect all the literal refinements we have in mind, and make sure everything fits together ((and also works for imaginable future types like Int128 and Float16) before working on individual points.

E. g.

Anything I missed?

soc commented 3 years ago
soc commented 3 years ago

2.: