DEV Community

Discussion on: If you could write a programming language how would it be?

Collapse
 
orkon profile image
Alex Rudenko

You forgot 64bit integers and, perhaps, proper integers in general :-D

Collapse
 
nektro profile image
Meghan (she/her) • Edited

All numbers in JavaScript are automatically 64 bit floating-point numbers.
Source: ECMAScript 262 § The Number Type

Thread Thread
 
orkon profile image
Alex Rudenko

Do you say that a 64-bit float-point number is as good as a 64-bit integer? stackoverflow.com/questions/964362...

Thread Thread
 
nektro profile image
Meghan (she/her)

No, in a perfect world, as a part of the 'use native' directive I mentioned in my OP comment, you would be able to comment on variables to specify the number type

something along the lines of

/** @type i64 */ // i64 could be replaced with any of i8,i16,i32,i64,f8,f16,f32,f64
const num = 12;