3 ms·
The goal of things like asm.js is to make JavaScript a general purpose, low level programming language. I'm not sure why you consider it esoteric, though. Peop
by tree_of_item 14y ago
The goal of things like asm.js is to make JavaScript a general purpose, low level programming language. I'm not sure why you consider it esoteric, though.
People don't do those things in the browser because asm.js (or some alternative) isn't widespread yet. When it is, they will.
- dvt 14y agoExactly. JS was never meant to be a general-purpose language. Using the right tool for the right job is a fundamental aspect of software engineering. If you use C for writing web-apps and JavaScript for writing operating systems, you're doing something very, very wrong. The irony here is that JavaScript isn't even a very good language, anyway. So when lambdas are implemented in a language like C++11 (to the chagrin of many programmers that shun the unnecessary complexities of recent revisions of C++), that's one thing; but when we're trying to use JS for low-level programming, that seems very silly. And as far as your second point is concerned, I beg to differ. Java has been able to run OpenGL in the browser for ages. Flash can also do hardware-acceleration. As can Unity3D. 99% of computers have either Flash or Java installed, and yet, no serious developer (barring maybe a couple of indies) would seriously consider Java/Flash as a serious platform. I don't think HTML5/asm.js will change that.
- bzbarsky 14y ago> 99% of computers have either Flash or Java installed If you define "computer" as being something that's not a "phone" or a "tablet", sure. But people writing web content today sure care about those non-"computer"s...
- macspoofing 14y ago>JS was never meant to be a general-purpose language. The original designers and implementers of the Internet, the Web and HTML probably never envisioned the myriad of ways those technologies would be used (abused?). So what? >Using the right tool for the right job is a fundamental aspect of software engineering. So tell me, what is the right tool to build a cross-platform application that runs on every system, without requiring native install (and with every other benefit of a typical 'web-app')? >If you use C for writing web-apps ... WHY?!? How can you even say that in light of the Unreal demo that Mozilla showcased, where you have a high-performance game running on a standard browser. Given that, you still see zero potential? I don't know if browser gaming will take off, but that's irrelevant. If the browser can run a high performance game, it tells me devs can make use of that processing power to build any sort of web application that traditionally would have needed to be native. You don't see the potential in being able to build a web-based Photoshop or AutoCad? >The irony here is that JavaScript isn't even a very good language, anyway. You're right, it isn't, so what? HTTP isn't the best protocol, and neither is TCP, but try replacing them with any 'superior' protocol. JavaScript, like HTTP, and TCP is ubiquitous, that's its strength. >no serious developer (barring maybe a couple of indies) would seriously consider Java/Flash as a serious platform. I consider both serious platforms for gaming and otherwise, even with the knowledge that they will be replaced by HTML/JS on the client.