3 ms·
I don't know why you're fixated on things like asm.js and C++ here when I didn't bring either of them up. Here's the deal: Yes, C++ is a monster. Yes, asm.js m
by kevingadd 13y ago
I don't know why you're fixated on things like asm.js and C++ here when I didn't bring either of them up. Here's the deal:
Yes, C++ is a monster. Yes, asm.js might be doomed. I don't really care, because I don't like C++ and I don't have any intent to use asm.js. Given that, however:
C++ may be a monster but it's the monster that won. Worse is better, or whatever: C and C++ are tremendously prevalent languages and nothing anyone has done has managed to displace them even one bit. We've got new languages like Java and JavaScript that have managed to carve out footholds, but it's still a fact that when you grab a modern piece of software, it's almost always written in C, C++, or a weird C derivative (like Objective-C).
Note also that I've never argued here that the design behind closed doors is the problem, merely that it is a root of the problem. The design behind closed doors leads to poor/misguided design decisions being baked into a project and then cemented by years of engineering and derived decisions. You can certainly undo all that bad decisionmaking after you put your project out in the open, but it's not free, and it comes at the cost of severe resistance because people aren't excited by the idea of throwing out all the work they did. You can see this by looking at the mailing list for the W3C Audio group right now and observing just how hard it is for them to specify the Audio API that Google designed behind closed doors. An equally troubled API could have been designed in the open, but being designed behind closed doors is why it ended up with a narrow design that wasn't informed enough by a wider set of use cases and customers.
It's incredibly easy for software engineers to convince themselves that they are expert enough to make all the right design decisions and lock them in. We've seen it again and again. That is why it is important to work in the open and that is why Google's reluctance to do so early on causes lots of friction for (technologically stellar) projects like Dart and NaCL.
Were Dart already an established language player like C or even Java, these complaints wouldn't really matter, because at that point a language is a thriving, living thing that can evolve as time passes to become a better language and overcome its own faults. The problem here is that Dart is not there, it's not anywhere close to there, and it's not clearly on anything resembling a trajectory to there. If the software engineering community as a whole - not just people at Google - don't start learning from these mistakes we're just going to keep adding to a long, dire list of failed languages, libraries, and platforms.
Asking people to adopt a new language you designed for your needs, learn a bunch of new libraries, and rewrite all your code in order to run it in a small subset of available runtimes is simply not a winning play. As a developer I have literally dozens of great languages to pick from to write my applications in - Haskell, Scala, C#, Python, etc. Why would I pick Dart if the toolchain isn't there, the runtime isn't there, the libraries aren't there, and Google might abandon it in 5 years when it doesn't catch on?
And now you know why I'm writing a transpiler for an existing language that outputs JS, instead of hacking on something like Dart: Because I don't want to waste my time.
- cromwellian 13y agoIt's interesting you mention Web Audio, because Web Audio, AFAIK, is based on a tried and true mature Audio API (Core Audio on OSX, Chris Rogers worked on both) that has had tons of feedback from the professional audio community for years. I wonder, how much of the objection is based on Mozilla because their counter proposal to essentially delegate DSP to JS was rejected? And how do you define working in the open? Isn't dropping design docs and sample implementations into open repositories, and then iterating on them in public, open? Asm.js was just dropped like a bomb on everyone. When they announced it, they had running code already, and V8 at the time ran it very poorly. When Mozilla announced their Device API effort, they completely avoided the parallel W3C effort at first (I don't blame them) There's a kind of bizarre mismatch in the treatment between Google's work on projects in the open, and Mozilla's code dumps which get a pass. The specs-first-implementation-second approach is IMHO a ret-con of how things are done in the industry. Rough consensus and running code is the usual model. You need experience from implementations in the wild to inform the specification, feedback from actual people trying to develop applications or implementations. Pretty much everything that went into each revision of OpenGL started life as a "behind closed doors" OpenGL extension, that was subsequently generalized, and incorporated into the base spec. We tried the "do everything at the standards committee level first" in the 00s at the W3C and the Web stagnated. XHTML, XForms, XSL, XPath, XPointer, SVG, SMIL, on and on. A long list of mostly failed standards that took forever to get standardized, and by the time they did, the world had moved on. Really, only SVG remains viable and the spec is crazy complex. Look at how C# evolved vs Java. Java worked via a community process "don't break existing semantics", and as a result, we got really shitty generics, and hardly any improvements to the bytecode or VM. Microsoft took a shotgun to C# 1.0, and as a result, IMHO, C# 3.0+ is way better than Java. Frankly, I don't believe Javascript's semantic model can be evolved without breaking backwards compatibility. For example, Javascript is fundamentally single threaded and non-shared memory, yet today's devices, even mobile ones, have 2-8 cores on them. You can introduce shared memory, but then what, how do you implement concurrency primitives? You're retrofitting a memory model into a language that didn't have one, unlike Java which introduced the JMM early on. To me, Javascript's memory and execution model makes it fundamentally incompatible for something like an intermediate representation for portable code for high performance games. Yes, the demos are impressive, but who is going to ship Infinity Blade 3 as asm.js on mobile if there's a native OpenGLES API? The TC39 committee is essentially operating with design constraints that inhibit solving real problems with the language due to concerns with backwards compatibility. It's mostly syntactic sugar. Everything has to start somewhere. Java started out from zero, backed only by Sun. C# as well. A whole community of libraries and tools had to be built. All languages go through this process. I work on GWT, it outputs JS, so I understand the power of leveraging existing libraries and toolchains. But there are always pioneers and early adopters who want to work on fresh new platforms and throw away existing paradigms. Why oppose them? I think it is important for people to sometimes ignore what exists and see what can be done if you start from scratch. That's how we get breakthroughs instead of incrementalism.