4 ms·
I don't think it answered why ... If you need better performance, you should go closer to the metal anyway? Isn't the purpose of JS that you would easily be ab
by z3t4 10y ago
I don't think it answered why ... If you need better performance, you should go closer to the metal anyway?
Isn't the purpose of JS that you would easily be able to view the source, that it's actually source code running, and not binary!?
- TazeTSchnitzel 10y agoJS was meant to be a simple scripting language for web pages. But now that we have huge applications we're compiling from C or C++, plaintext isn't the best format. Binary formats are nothing new to the web, it's used them for images and such for a long time now. In fact, the one raster plaintext image format (XBM) is no longer supported.
- z3t4 10y agoThe attack vector of a image format is minuscule compared to actual running code. It's not like you are worrying about a jpg image performing an x-site injection. SVG's are quite popular!
- TazeTSchnitzel 10y agoFont and image binary format parsing have been the source of plenty of zero-days over the years. :)
- chrisseaton 10y ago> Isn't the purpose of JS that you would easily be able to view the source Who said that was the purpose of JS?
- z3t4 10y agoProbably same person who said Linux/GNU is more secure. But why? Same reason why you don't let invisible aliens on-board your spaceship! Programs become tremendously more secure when it's possible to read the source code and actually compile it yourself.
- flohofwoe 10y agoMuch easier distribution and an open platform. Microsoft and Apple are both slowly tightening the screws on their desktop platforms for software that's not going through their app store and the mobile platforms have always been walled gardens. The web is (still) open, and distribution is much simpler both for the developer and the for the user (the developer just uploads to a web server, the user just clicks an URL). As for view source: on one hand JS is already mostly minimized, on the other hand, WebAssembly has somewhat human-readable lisp-like ASCII representation which can be generated from the byte code. But I think view-source hasn't been useful since many years.
- skybrian 10y agoPortable eval() is a good thing not easily found elsewhere. Making portable eval faster and more useful (while still widely available) is different than switching to architecture-specific code generation. That said, generating JavaScript is fast enough most of the time and more portable so it's probably the place to start.