JavaScript can perform fairly well on the modern engine with JIT. The DOM though it is horrible for this purpose, and so are other browser component, and people rarely will include one without the other.
I do not like it as a design choice, but there are many languages with a dynamic number type like this, and it does not matter for most use of the language.
Ironically, it is heavily optimized in spite of this. For example, JS arrays are sparse, but runtimes like V8 optimize them to be packed, if possible (if the array contains only integer indices and no holes). Integers also stay integers, if the runtime is fairly confident that they won't suddenly become floats. Moreover, if the runtime finds out that some JS objects don't change their shape (i.e. have the same properties and their inferred types), their relative addresses are cached, so the runtime doesn't need to look them up every single time.
Yeah it's moreso the size of the web "standards" (makes it hard for anyone to create a new implementation), the interest groups that control it, the amount of baggage it has acquired over time (and started with), and the inefficiency and other problems that come with using text-based formats that require parsers and stuff. WebAssembly could be a good replacement if there is ever a standardized "desktop" API that doesn't require javascript, but for now WASM is just another barrier to creating an implementation of the web standards.
Doesn't seem like its going anywhere fast and the main thing it needs is a graphics API and interface to act as a desktop like program. I just don't know if there's enough motivation from big companies to do that. I doubt Google wants creating a web browser to become simpler. There really just needs to be a specific project to replace HTTP+HTML+CSS+JS+WASM with HTTP+WASM or QUIC+WASM or something.
JavaScript can perform fairly well on the modern engine with JIT. The DOM though it is horrible for this purpose, and so are other browser component, and people rarely will include one without the other.
What does it matter if it performs well or not, when it doesn't even have separate types for an integer and a float.
I do not like it as a design choice, but there are many languages with a dynamic number type like this, and it does not matter for most use of the language.
That's true, but it does matter for medical equipment, which the op mentioned.
ah man that makes me uncomfortable
deleted by creator
Ironically, it is heavily optimized in spite of this. For example, JS arrays are sparse, but runtimes like V8 optimize them to be packed, if possible (if the array contains only integer indices and no holes). Integers also stay integers, if the runtime is fairly confident that they won't suddenly become floats. Moreover, if the runtime finds out that some JS objects don't change their shape (i.e. have the same properties and their inferred types), their relative addresses are cached, so the runtime doesn't need to look them up every single time.
deleted by creator
Yeah it's moreso the size of the web "standards" (makes it hard for anyone to create a new implementation), the interest groups that control it, the amount of baggage it has acquired over time (and started with), and the inefficiency and other problems that come with using text-based formats that require parsers and stuff. WebAssembly could be a good replacement if there is ever a standardized "desktop" API that doesn't require javascript, but for now WASM is just another barrier to creating an implementation of the web standards.
There is! It's called WASI and it's being standardized.
Otherwise, there's nothing stopping you from making Electron apps with wasm right now, of course.
Doesn't seem like its going anywhere fast and the main thing it needs is a graphics API and interface to act as a desktop like program. I just don't know if there's enough motivation from big companies to do that. I doubt Google wants creating a web browser to become simpler. There really just needs to be a specific project to replace HTTP+HTML+CSS+JS+WASM with HTTP+WASM or QUIC+WASM or something.
Take a look at WebGPU, which can be used from wasm. It's an upcoming standard, but we also have had WebGL since forever.