https://developer.mozilla.org/en-US/docs/JavaScript/Referenc...
Is there any work to add weak values to JavaScript? There's a node module, but nothing for client-side code.
171–180 of 266 posts
https://developer.mozilla.org/en-US/docs/JavaScript/Referenc...
Is there any work to add weak values to JavaScript? There's a node module, but nothing for client-side code.
Anyone executed this yet? http://brendaneich.github.com/Strange-Loop-2012/assets/image...
See https://speakerdeck.com/u/dherman/p/es6-deep-dive a bit more than half-way through -- the "Something Completely Different" section.
Great presentation btw.
This presentation saddened me. The presentation focused on what it perceived as missing features: structs (seriously?), classes, modules, syntactic sugar, macros, etc. But the huge gaping holes in Javascript are not missing features. They are fundamental errors in the language. Things like ==, numbers as strings, eval, incorrect definitions of false, semicolon insertion, and -- heaven help us all -- improper lexical…
You seem to misunderstand "structs" -- see http://wiki.ecmascript.org/doku.php?id=harmony:binary_data , this is an extension of WebGL's typed arrays, which are already in all the new browsers (IE10 too). As for implicit coercions, I enjoyed Gary Bernhardt's "Wat", referred to it, and at past talks even mocked along with. At Strange Loop, I went through each "Wat" in the "Wat Secrets Revealed" slide series (use down a…
Oh, please let the syntax for this be something like
let == = ===;
:-PEarlier quoted context omitted.
If I sound argumentative and fired up, it's because I feel like Mozilla has been casting stones on this issue for years. Imagine how you would feel if Google executives were publicly criticizing Mozilla efforts like Persona, arguing that they would never support them and no one else will either, basing their criticisms on issues that you are actively fixing. (For what it's worth, Persona looks promising to me persona…
> (P)NaCl are specifically designed to allow execution of untrusted code without making it run on top of a VM or GC And this is the argument he's making: that does not fly by browser vendors. They DON'T want to have code run OUTSIDE their VM/GC.
- First they said JS was not practical for building 'rich
internet apps' because of performance issues combined with
the well known maintainability problem with JS in large
code bases.
- Then they said it wasn't currently fast
- Then they said it hadn't been fixed
- Then it doesn't do multicore/GPU
- Right every time
- My advise: always bet on JS* being behind most other
languages because it is a slow moving standards based
language created in a dictatorial fashion by a committee
and input from a few powerful entities.In 8 years we can look forward to using this... Where will other languages be in that time??? Ahh committee decided standards.
Also, you can compile from ES6 to ES5 or ES3 I would expect, plus there's also server-side tech like node.js.
Earlier quoted context omitted.
Reading the macros first helps. They must be defined at top of program or module, if I recall sweetjs.org's design correctly, for the staged hygienic expansion to work well. Aside from that, you're right. But JS has higher order functions and objects with ad-hoc methods, so it can be used according to many paradigms, which can make it hard for a reader unfamiliar with the dominant paradigm in code at hand. This is no…
Of course, as in every aspect of understanding, here for source code, it is important first to learn the context, here the macro definitions. My concern is that this will impose more than just a paradigm - it will impose new syntax which could effectively completely ruin the readability of JavaScript source. The macro syntax is definitely not simple, and it could possibly get really complex for more elaborate syntact…
True, but the same can be said of any API. Reading the definitions can help but for both complex macros and complex APIs built today out of just functions and objects you need to document your abstractions. Macros don't change this, they just give you another abstraction axis (syntactic) to work with.
As with most things it just depends on how you use it. Sure you can abuse macros to make tons of crazy, undocumented, hard to understand syntactic extensions that destroy readability. But you can already do that today. Used wisely macros can increase readability, used poorly they can decrease it.
> And does the effort to integrate macros into the browser mean that it'll be possible to evaluate macros "runtime"?
Not sure what you mean here. By definition macros are expanded at compile time (well, parse time really). The browser doesn't change this.
Aside from my personal distaste for his backing up the semantic truck and dumping it into ES6, I think it's a bit annoying -- to the point of being disrespectful -- that Brendan doesn't mention V8 in his history of JavaScript. Without V8, there is no JavaScript on the server-side (sorry, Rhino and SpiderMonkey), there is no Chakra and there is no TraceMonkey/JagerMonkey/IonMonkey: given that JavaScript had survived f…
Howdy, Bryan. A few comments. First, it's not all about _moi_. As with any mature language with multiple implementations, there is a committee, Ecma TC39. It has reps from all the bigs plus PayPal (Doug Crockford) and Yahoo!. We avoid design by committee, instead focusing on paving the cowpaths and in a few cases working with champions -- single innovators or RPG's "resonant dyads" _a la_ ken&dmr -- to do focused des…
> First they said JS couldn't be useful for building rich internet apps
Who said it is? Rich - yes. Anything near to match complexity of the desktop apps - never(think Photoshop).
> Then they said it couldn't be fast
Benchmarks, maybe?
> Then it couldn't do multicore/GPU
Webworkers are nice, but you can add bindings to all of this stuff for virtually any programming language.
> JavaScript's parser does a more efficient job... than the JVM's bytecode verifier.
Figures again?
> No view source
How viewing at minified JS is going to help me? Especially in the light of what he had on his previous slide:
function f() { L0: g(); L1: if (p) goto L0; o.m(); goto L1; }
Good luck "view source" on what he calls "the assembly of the web".
Then the screenshots of 3D games that presumably use WebGL - that just doesn't cut it. Just about every game demo I tried out on my previous generation hi-end ATI graphics card had performance issues. And the level of graphics is comparable to what native games had 10 years ago. That's a joke.
> Typed arrays
Until they add records so that I can declare an array of any type efficiently don't even bring this up. This is an ad-hoc solution.
Earlier quoted context omitted.
Howdy, Bryan. A few comments. First, it's not all about _moi_. As with any mature language with multiple implementations, there is a committee, Ecma TC39. It has reps from all the bigs plus PayPal (Doug Crockford) and Yahoo!. We avoid design by committee, instead focusing on paving the cowpaths and in a few cases working with champions -- single innovators or RPG's "resonant dyads" _a la_ ken&dmr -- to do focused des…
Brendan, I appreciate the thoughtful reply. I think the only reason for my criticism (and the word "disrespectful" was too harsh -- I should have left it at "annoying") was that your last slide ("Always bet on JS") implies (to me, anyway) that JavaScript's high performance is its manifest destiny. And that, to me, understates the contribution of V8: the high performance of JavaScript was not a foregone conclusion; it…
The chosen measure of these new VMs was a set of benchmarks, SunSpider from Apple and the V8 Benchmarks from Google. While V8 had the best GC and most optimizations, on these suites at least, for about two weeks for TraceMonkey (and longer for SFX), V8 was not that far ahead.
You can find the charts via Google still.
V8 had the longest lead time, not just working on what was released with Chrome but trying other approaches first, learning from them, and starting over. That's huge and it has paid off well.
But I don't agree that any architectural failing of one VM counts more than public, reproducible benchmark scores. Even V8 had to do Crankshaft.
Architectures evolve and supersede one another, but the developer and user benefit -- the public benefit -- comes from the competition. V8 was not alone in driving competition.