4 ms·
Hate to tell you, but JavaScript implementations virtually all rely on C or C++ as well. And it's not limited to the VM itself: check out npm "native extension
by scott_karana 10y ago
Hate to tell you, but JavaScript implementations virtually all rely on C or C++ as well.
And it's not limited to the VM itself: check out npm "native extensions" like `json`. Not to mention glibc, or the OSes themselves.
By your definition, nothing is safe. And you're right ;)
- MichaelBurge 10y agoThat's the old "formal proofs are useless because the proof checker might have a bug" argument. It's not very persuasive.
- scott_karana 10y agoIt's MaulingMonkey's argument ad absurdum is what is is :P
- MaulingMonkey 10y agoI'm aware. I note that Firefox is using some Rust code now - so perhaps that will change at some point, for at least one of the common JavaScript implementations, in the not too distant future. I don't imagine we'll see it for the majority within the decade - but who knows, maybe I'll be pleasantly surprised. I have less hope for the widespread adoption of OS kernels written in safer languages - given the general unwillingness to even use C++ there (although plenty of toy/'research' kernels in safer languages do exist.) Although maybe we'll see one within the next century? Perhaps a microkernel for use in containers? Of course, that still leaves bugs in the JITs, compilers, hardware, 'legacy' native interop, unsafe{} blocks, ...
- rat87 10y ago> I note that Firefox is using some Rust code now - so perhaps that will change at some point, for at least one of the common JavaScript implementations, in the not too distant future. I don't imagine we'll see it for the majority within the decade - but who knows, maybe I'll be pleasantly surprised. Maybe I think currently there's no plan for it. Maybe after they finish servo to the degree where it supports all modern html features
- pjmlp 10y agoHistorical accident, given that the better alternatives, for various reasons lost their market share to C and C++, while Sun and Microsoft had the dumb idea of not supporting the same AOT compilation to native code on their new languages from day one.