16 ms·
The State of JavaScript - Brendan Eich
- petercooper 14y agoHope they have the video out sometime! Seems to be some crossover with his keynote at Fluent: http://www.youtube.com/watch?v=Rj49rmc01Hs http://www.youtube.com/watch?v=Rj49rmc01Hs - but these slides go into a lot more depth and include some of the newer goodies coming along.
- puredanger 14y agoWe're working on it....
- mcantor 14y agoTrying to read this on my Galaxy Nexus was a non-starter...
- buddycasino 14y agoIt was clumsy, but worked well enough for me. Any idea what library is being used?
- PeterMcCanney 14y agohttp://lab.hakim.se/reveal-js/ http://lab.hakim.se/reveal-js/
- hayksaakian 14y agoThe first slide was a pita but once you get pas that its OK. I swiped over the top half of the screen in portrait. Google chrome beta.
- andreyf 14y agoKind of annoying presentation style quirk: but some slides are on a vertical stack which you can access by hitting the down arrow instead of going right. You can tell in the bottom right which directions are available from the slide you're on.
- Ygg2 14y agoI just used the mouse wheel and it always went the right order, even if vertical.
- doesnt_know 14y agoSame, but it still seems unintuitive and pointless. Why not just keep them going from left to right? I'm pretty sure the target audience for this only really cares about the content and anything else just gets in the way.
- davidw 14y ago"You are in a maze of twisty little passages, all alike."
- kybernetikos 14y agoProbably to provide the possibility of not drilling down into details so you can change the presentation based on the audience.
- davidbanham 14y agoPersonally I use it to map my presentation into chapters. It allows me to better know where I'm at while presenting, and allows people reading my slides to get an idea of how it's laid out inside my brain. It was just used by a colleague to organise his slides into: Topic ▼ Code example ▼ What that code renders into The last slide was actually rendered live from the slide before it. Absolutely badass.
- exodust 14y agoI really liked the presentation of slides, and enjoyed using the arrow keys to navigate. It was fun, and could have been very boring (for me).. it made me read more than I would have.. It was good viewing those slides in isolation, made me study some of the functions with more focus.
- andrewcooke 14y agoif you hit the space bar you can see a "map"; space again to return to where you were.
- ww520 14y agoOverall pretty impressive feature list. I guess proxy is intended for the monkey patch crowd.
- bzbarsky 14y agoOr for anyone who wants to implement a DOM in JS, say. Or a security membrane (Caja, say). There are a bunch of other use cases too...
- happypeter 14y agoThx for sharing!
- happypeter 14y agoI was down voted cause I said something hollow. I shall pick the lesson, and: Thx for the down-voting! :-)
- sbierwagen 14y agoEvery time I see a slide deck with zero context or explanation, I want to light my eyelashes on fire.
- BrendanEich 14y agoVideo coming (conferences like Strange Loop are good about this but you had to be there to get the full effect), plus see https://brendaneich.com/2012/10/harmony-of-dreams-come-true/ https://brendaneich.com/2012/10/harmony-of-dreams-come-true/ for a companion blog post that focuses on some of the slides.
- skyhook_mockups 14y agoThe last slide was interesting: http://brendaneich.github.com/Strange-Loop-2012/#/50 http://brendaneich.github.com/Strange-Loop-2012/#/50 - First they said JS couldn't be useful for building 'rich internet apps' - Then they said it couldn't be fast - Then they said it couldn't be fixed - Then it couldn't do multicore/GPU - Wrong every time - My advise: always bet on JS It turns out that JS might soon be a mature language which can be used to build real apps. That future has arrived (or at least you can see the train). es6/7+hardware accelerated graphics+ continued broadband adoption and speed increases (gigabit internet) make the 'web as a platform' dream a reality. I'd love to peek at Microsoft's medium term plan to deal with this. Also: I wonder how long until we see a full replacement for something like eg:3DSMAX with GUI on the client and rendering done in the 'cloud'?
- InclinedPlane 14y agoIt's disingenuous to claim that javascript is not a "real" language already. This is like claiming that PHP or VB aren't "real" languages. You may not like it, you may think it's missing crucial, key features, but there is a lot of JS code out there in the wild producing value for businesses and customers and generating billions of dollars in revenue. Edit: looks like I misread the parent post, my apologies.
- skyhook_mockups 14y agoLooks like I didn't communicate too well. I wholeheartedly agree that JS is a real language. It's my main language and I've written tens of thousands of lines of the stuff. It has it's quirks but I like coding in it. My "JS as a 'real' language" was a tongue-in-cheek go at those who constantly criticise it for being a toy language. I've edited my original comment.
- anil_mamede 14y agoBut without an ecosystem of frameworks like OSX or .NET, it will be difficult to develop apps with good and consistent experience.
- 14y ago
- jeswin 14y agoI think he missed mentioning the new lambda syntax. Hope it's still in ES6. Also, my pet peeve: there is no language that needs await/defer as much as JS. EDIT: Maybe it could be done with macros, which is on its way.
- masklinn 14y ago> there is no language that needs await/defer as much as JS. http://wiki.ecmascript.org/doku.php?id=harmony:generators http://wiki.ecmascript.org/doku.php?id=harmony:generators is a more general abstraction, which allows expressing async/await-type constructs: http://taskjs.org/ http://taskjs.org/
- BrendanEich 14y agoI skipped arrow function syntax (=> only in ES6). It was a bit much and I wanted to focus on APIs and compilation.
- laktek 14y agoHere's a more detailed write-up on some of the ES6 features mentioned in the slides - https://brendaneich.com/2012/10/harmony-of-dreams-come-true/ https://brendaneich.com/2012/10/harmony-of-dreams-come-true/
- haberman 14y ago> NaCl? Not portable. To dis NaCl on this basis and not even mention PNaCl is dishonest. http://www.chromium.org/nativeclient/pnacl/building-and-testing-portable-native-client http://www.chromium.org/nativeclient/pnacl/building-and-test... > Defined by implementation. As it should be, until the implementation settles and it's clear what interfaces should be standardized. What a waste of time it would have been to standardize the pre-PNaCl work, for example. I wouldn't expect Rust (for example) to be standardized at this point either. > No view source. It's highly unlikely that JavaScript spit out by a code generator (this would be the competition for NaCl) is going to be at all readable. I'm guessing it will be about as readable as the portable BitCode that comprises the PNaCl image (which you could view if you really want to). It's disappointing to continuously see this anti-NaCl propaganda from Mozilla. Here you have a promising and highly innovative technology that is pushing the bounds of what is possible on the web. It's being developed completely in the open with papers and code being published continuously. Mozilla's mission is "to promote openness, innovation and opportunity on the web." I just can't see what part of that mission involves campaigning against an open technology that could advance the web and help it compete with native apps. I could understand if their position was "we're reserving judgment until it's portable, stable, and standardized." I could understand "we want to be more involved in the process." I could understand "we are waiting to see if it can demonstrate a compelling advantage over JavaScript." But everything I have heard indicates that they are publicly and completely opposed to ever supporting it, which will make it all the harder for them to ever change their mind on this point without losing face. I grew up watching Mozilla develop from an unstable binary called "apprunner" into a full-featured open-source browser with cutting edge extension capabilities. I downloaded almost every single milestone and tried it out, craving the day when I could ditch crappy old Netscape 4 for good. I got warm fuzzies when the Mozilla Foundation was created; it felt good knowing that there would always be a way to use the web with open source software, and that there would always be an advocate for openness and freedom. I just never expected to see them fighting against open technology. It's disappointing.
- laktek 14y ago> It's highly unlikely that JavaScript spit out by a code generator (this would be the competition for NaCl) is going to be at all readable. With SourceMaps it's possible to make them readable[1]. Also, problem with NaCl is it forces developers to move away to a different toolchain. Most developers would feel more comfortable and productive in developing in the browser, rather than moving to a IDE. [1] - https://wiki.mozilla.org/DevTools/Features/SourceMap https://wiki.mozilla.org/DevTools/Features/SourceMap
- mparlane 14y agoAnyone executed this yet? http://brendaneich.github.com/Strange-Loop-2012/assets/images/jsfunge.png http://brendaneich.github.com/Strange-Loop-2012/assets/image...
- InclinedPlane 14y agoI tried running it through a few different free online OCR services and haven't had any success yet.
- BrendanEich 14y agoSee https://speakerdeck.com/u/dherman/p/es6-deep-dive https://speakerdeck.com/u/dherman/p/es6-deep-dive a bit more than half-way through -- the "Something Completely Different" section.
- mparlane 14y agoThanks Brendan, stops an absorbent waste of time :P Great presentation btw.
- bcantrill 14y agoAside 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 for a decade in its pre-V8 state of abysmal performance, it's entirely reasonable to assume that it would have slept away another decade had it not been jarred out of its slumber by V8. So it would be nice to see some respect where it's clearly due...
- eranation 14y agoI wonder what he would have said about TypeScript, it seems that it was launch after this conference (though there is a large chance he was in the loop, no pun intended)
- masklinn 14y ago> I wonder what he would have said about TypeScript Likely nothing. The presentation has a slide on compiled-to-JS languages, and a link to a listing site. Eich doesn't seem to mind languages compiled to JS so far.
- mun2mun 14y agoHe seems ok with it http://twitter.com/BrendanEich/status/254010839701544960 http://twitter.com/BrendanEich/status/254010839701544960
- eranation 14y agoToo bad he wasn't in the loop though, MS could have gained some additional momentum involving him: https://twitter.com/BrendanEich/status/255649668548136960 https://twitter.com/BrendanEich/status/255649668548136960
- masklinn 14y ago> I think it's a bit annoying -- to the point of being disrespectful -- that Brendan doesn't mention V8 in his history of JavaScript Bullcrap. Why would V8 deserve any more mention than Spidermonkey (which had none, by the way) in a talk about the semantics and language evolutions of javascript when it's Gecko/Spidermonkey which pioneered and implemented roughly 95% of these evolutions in the first place? Why would it deserve more than Trident, which — through xmlhttprequest — is the one responsible for the vast majority of the language's actual popularity? Because it's your pet runtime and you dont like others? > So it would be nice to see some respect where it's clearly due... You may want to take this advice for yourself, your comment is dismissive, insulting, contemptuous and contemptible.
- eranation 14y agoI was really upset that I don't know all this about the future of JavaScript, and then I googled and realised this is from the guy who invented it.
- iSnow 14y agoIs it just me or does the proposed ES6-standard smell of heavy feature creep? - we get classes _and_ modules _and_ typed objects. Yeah, those all have their merits and are all somehow different, but having them all seems to add only slightly more value while increasing the overall difficulty of the language considerably. - same with macros and codegens. While they certainly are different animals, there seems to be overlap in the area they will be employed. To me, there seems to be feature envy on the side of the JS crowd to try and bake every nice feature into the language. I am not convinced this is the right direction.
- wycats 14y agowe get classes _and_ modules _and_ typed objects There aren't "typed objects". There is a new library for working with binary data efficiently. Classes and modules serve different purposes. Classes provide syntactic sugar for prototypal inheritance. Modules provide a baked-in mechanism for encapsulating and sharing code. same with macros and codegens Neither of these are on tap for ES6. Brendan showed them as interesting experiments that may be proposed for a future release.
- BrendanEich 14y agoQuite right about macros, but codegen is happening now, all over the place.
- dherman 14y ago> Is it just me or does the proposed ES6-standard smell of heavy feature creep? I've been on TC39 for years and the vast majority of what we do is cut. > we get classes _and_ modules _and_ typed objects. Classes are syntactic sugar for one of the most common dynamic patterns in JavaScript: object factories. Modules are static collections of code. Very different things, especially in a dynamic language like JS. Typed objects are not even remotely related; they're a low-level API for efficiently working with structured binary data. > same with macros and codegens. As Yehuda says, macros are not part of ES6 but rather an experiment at http://sweetjs.org http://sweetjs.org to consider for future editions. I don't know what you mean by "codegens." Brendan's slides weren't talking about a feature, but rather an existing usage pattern that we need to serve in additional to human code-writers. ES6 actually does a remarkable job covering many use cases with small modifications that smoothly integrate with the existing language. You might want to try experimenting with some of these features, many of which are implemented partly or completely in SpiderMonkey (as Brendan's latest blog post details). Most of the features are small improvements to paper cuts, and as everyone I've ever spoken to who's written SpiderMonkey-specific JavaScript attests (for example, in the Firefox front-end or in addons), they make your life so much nicer. I'm particularly thinking of let and destructuring, and I suspect parameter defaults and rest-arguments will be hugely popular as well. The few bigger features, especially modules and generators, are for addressing the most important gaps in JS. Dave
- rorrr 14y agoWhat's the point of "Map" and "Set" in Javascript? Objects can already act like either.
- wycats 14y agoObjects can only have String keys. Maps and Sets can have arbitrary object keys.
- paulrouget 14y agoYou can only have a string as a key if you use Object. You'd need to build hash for the key then. And that makes things much more complex.
- masklinn 14y ago* Objects as maps have limitations: only string keys, and literal objects have a prototype so you inherit potentially risky properties/behaviors * Objects as sets are kinda terrible, they're not syntactically awesome and you need to override #toString to make them work correctly. They also don't support any set operation which sucks.
- shabble 14y agoAlso see http://www.devthought.com/2012/01/18/an-object-is-not-a-hash/ http://www.devthought.com/2012/01/18/an-object-is-not-a-hash... from earlier about some pitfalls that you might not immediately consider. (HN Thread: https://news.ycombinator.com/item?id=4629544 https://news.ycombinator.com/item?id=4629544)
- surrealize 14y agoWhat's the compile-to-JS language mentioned on http://brendaneich.github.com/Strange-Loop-2012/#/22 http://brendaneich.github.com/Strange-Loop-2012/#/22 with the lambda-in-yin/yang logo? It mentions macros, but nothing on the altjs.org front page mentions macros.
- stevekinney 14y agoThat's Clojure (or—in this case—ClojureScript, which compiles down to JavaScript), which is a Lisp derivative that runs on the JVM. http://clojure.org http://clojure.org
- masklinn 14y agoAnd https://github.com/clojure/clojurescript/wiki https://github.com/clojure/clojurescript/wiki for the ClojureScript site-ish.
- alexfarran 14y agoClojureScript a Clojure to JS compiler.
- masklinn 14y agoClojureScript is really defined as a Clojure dialect, it has semantic differences from the "main" Clojure and is a slightly different languages (in part because features are missing from CS, in other parts because things were changed to work better and may or may not be folded back into Clojure). ClojureScript macros are written in Clojure though.
- SeanDav 14y agoNot working for me in Chrome, works ok in Firefox. Could really do with a very basic guide on how to use the slideshow. Simplicity is good but this is bordering on frustrating and irritating.
- davidbanham 14y agoIt's in revealJS: http://lab.hakim.se/reveal-js/ http://lab.hakim.se/reveal-js/
- gbraad 14y agoThe Strangeloop talk seems to be quite similar to the one given at BrazilJS: http://www.youtube.com/watch?v=84l0BrOlJwk http://www.youtube.com/watch?v=84l0BrOlJwk (part 1) http://www.youtube.com/watch?v=IlQTjb794as http://www.youtube.com/watch?v=IlQTjb794as (part 2)
- jorangreef 14y agoI would really like support for 64-bit integers and native 64-bit math.
- bthomas 14y agoWhat kind of apps would this help with? JS is never going to take over on the server for me until it can compete with Python's statistics support, I didn't see much in these slides that suggests it could.
- Spien 14y agoNode.js modules and apps that work with C++ libraries/services that return 64bit numbers. Not having 64bit integers is an issue.
- BrendanEich 14y agoIs the lack of bignums (more than int64) the real issue? JS has IEEE754 binary double so that's the same as in Python. Library code can be cross-compiled a number of ways, so I wonder whether the blocker is the lack of Pythonic long.
- bzbarsky 14y agoThere are some proposals to make this happen... They're all in pretty early stages, sadly.
- BrendanEich 14y agoSee https://bugzilla.mozilla.org/show_bug.cgi?id=749786 https://bugzilla.mozilla.org/show_bug.cgi?id=749786 based on http://wiki.ecmascript.org/doku.php?id=strawman:value_objects http://wiki.ecmascript.org/doku.php?id=strawman:value_object.... ES7 at this point. Help test. I need to put up a rebased patch...
- jorangreef 14y agoThanks Brendan, that is good news, added to the cc list, looking forward.
- netmute 14y agoAm I the only one who really dislikes the recent trend of just posting slides without any kind of commentary at all? Slides are not very helpful on their own :(
- mikecane 14y agoNeed some advice here. I want to learn JavaScript -- but after reading all that, I wonder if all those changes/additions means that I should wait? Or will learning JavaScript now make little difference and all those changes/additions will make sense when enacted?
- bthomas 14y agoDon't wait. First, no guarantee that stuff will actually get adopted, it's still quite abstract. Second, even if so, it will take a while for browsers to catch up, so people will be coding in current JS for a while. Third, much of the current conceptual hurdles will still be relevant, particularly functional style and async design patterns. Would highly recommend Javascript: The Good Parts, don't know where I would be without it.
- lhnn 14y agoFor the record, I just bought "Javascript and jQuery: The Missing Manual 2e" and am impressed with its style of teaching. Yes, as someone who has programming background, it sometimes seems to be directed at those with no programming experience, but it still helps to start from the beginning and walk through. As someone with a some CSS, HTML knowledge and no CLUE what the DOM was or how javascript interacts with HTML/CSS, it's been a good few days for me.
- debacle 14y agoThe fact is that adding classes to JavaScript fundamentally alters the lispyness of the language in a detrimental fashion. I don't want to see JavaScript turned into Java script.
- bthomas 14y agoAgree. This is just speculation, but JavaScript classes also seem like they could be easy to mess up, particularly for a beginner web developer. I think there's a lesson from C and C++: don't add complexity unless it's absolutely necessary.
- MatthewPhillips 14y agoPeople already use it as though it had classes, so it makes sense to add the sugar. It will prevent errors such as SomeObject.prototype.foo = {} by not allowing data on the class body.
- debacle 14y agoSome people already use it as though it had classes. I don't like those people.
- MatthewPhillips 14y agoIt has objects which you can use as prototypes and create instances of those objects using the new keyword. Doing this has the side effect of my better performance. With all of that being the case, what do you expect people to do? The good thing about maximally minimal classes is that it prevents people from making mistakes by assuming that prototypes work just like classes in java/etc.
- debacle 14y agoIn my experience (and some benchmarking), there's no real difference in speed between using a Module-based factory method or using object prototypes. Modern JS engines optimize for both.
- colin_jack 14y agoThere is also a thread about the related blog post: http://news.ycombinator.com/item?id=4629952 http://news.ycombinator.com/item?id=4629952
- colin_jack 14y agoThis is from the a section on custom iterators in the related blog post (https://brendaneich.com/2012/10/harmony-of-dreams-come-true/ https://brendaneich.com/2012/10/harmony-of-dreams-come-true/): "We require opt-in to avoid future-hostility against custom iterators for collection objects. Such objects probably do not want any kind of general property iterator default, which if left on Object.prototype, might be object-detected and prevent installation of the correct custom iterator factory." I can see the sense in that but I find all the little caveats in JS are one of it's weaknesses which makes me dislike this idea. Am I wrong to think they should have just put in a default iterator but made it easy to spot it so that you could replace it with a custom iterator where appropriate?
- BrendanEich 14y agoPython does not have a default iterator for its objects. It does for dicts of course, but JS objects are not dicts (lots of issues there).
- colin_jack 14y agoI would just think default iterators are a sensible default especially for maps and that getting them in would be worth the very slight pain it might cause people wanting to attach custom iterators.
- BrendanEich 14y agoMaps have a default iterator as shown in my slides. Sets too. Best to take this to es-discuss. For now, we're sticking with Python, which did not give its top-class (non-dict) Object a default iterator.
- SeanLuke 14y agoThis 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 scoping. Language designers tend to incrementally add junk to languages until they are complex, unweieldy monstrosities like C++ or Java. Rarely do they fix fundamental errors in the language because that would require backward-incompatible changes. So they stick to adding lipstick to the pig. But JavaScript isn't like other languages: its fundamental errors are so glaring, and impact so negatively on the language, that the benefit of jumping to a "JavaScript 2.0" massively outweighs its incompatibility disadvantages. That's why we see languages like CoffeeScript cropping up despite all their downsides, notably debugging. The class bit particularly made me sad: JavaScript has a perfectly cromulent, even elegant, object model in the form of prototypes. But a variety of syntactic sugar hacks, weird constructor stuff, and general desperation to be a class-based language have sullied what would otherwise be an elegant mechanism. The solution appears to be: move more towards classes! Thus we still have all the language hacks, and two generally incompatible object models to boot. Plus structs! Somehow after reading this presentation, I was struck with Yoda's admonition: Eich seems to be looking to the future, never his mind on where his language was.
- nahname 14y ago>Things like ==, numbers as strings, eval, incorrect definitions of false, semicolon insertion, and -- heaven help us all -- improper lexical scoping. ==, numbers as strings => Problem: Type Coercion eval => Problem: Interpreted Language incorrect definitions of false => Problem: Type Coercion semicolon insertion => Problem: Language improper lexical scoping => Problem: Not block scope? >The class bit particularly made me sad: JavaScript has a perfectly cromulent, even elegant, object model in the form of prototypes. Both forms of object creation are valid. [Object.create] http://jsfiddle.net/X4Bxq/ http://jsfiddle.net/X4Bxq/ [new] http://jsfiddle.net/UGTga/ http://jsfiddle.net/UGTga/ Both take advantage of prototypes (the later takes full advantage today, with all browsers. The former requires a hack where you lose your type information). What is more important is that they are both awkward. So much so that most "JavaScript" programmers don't even use them. Those that do, spend most of their time arguing on which one is more correct. This is a problem. Introducing 'class' would sort this out by providing an easier syntax for class creation and an end to the arguments.
- streptomycin 14y agoIs there any estimate as to when this (mostly) awesome stuff will actually be implemented in browsers?
- simanyay 14y agoFirefox already ships with some (most?) of these features.
- masklinn 14y agoAnd according to [0], Chrome apparently has some (most?) of these features locked behind a big flag (seems to be "Enable Experimental JavaScript" in about:flags, no idea what's implemented though) edit: http://kangax.github.com/es5-compat-table/es6/ http://kangax.github.com/es5-compat-table/es6/ considering the sea of red, it's rather clear that both Firefox and Chrome only implement some ES6 features (note: this crashes Chrome 22 after enabling "experimental javascript", which may explain the big flag, and the latest Firefox 16 improves quite a bit on the listed Firefox 13: adds const, default params, rest params, proxies and all the new Number functions) [0] https://news.ycombinator.com/item?id=4633069 https://news.ycombinator.com/item?id=4633069
- amirouche 14y agoI am wondering what would look like Javascript would look like if it was built from the ground to be the ASM of browser languages.
- goggles99 14y agoI am sure glad that a small committee of people can use their influence to dictate the standards of the web. We get so much more progress and innovation this way and at such a higher rate of speed don't we? We don't need no stinking competition in the space. The standards people have a few people in high places here and there that the management in your company will blindly listen to to keep the standards alive. Long live the dictatorial monarchy of the all powerful omniscient governing body of web standards.
- goggles99 14y agoIn 8 years we can look forward to using this... Where will other languages be in that time??? Ahh committee decided standards.
- TazeTSchnitzel 14y agoWe can already use quite a bit of ES5, and it's not so old. I'm sure the same will be true of ES6. Also, you can compile from ES6 to ES5 or ES3 I would expect, plus there's also server-side tech like node.js.
- pixelcort 14y agoOne of the slides mentions WeakMap. The issue with them is that they have weak keys, not weak values. If you're trying to keep track of weak values (say to prevent duplicate instantiations of managed objects, while still allowing them to be garbage collected, for example), WeakMap won't work. https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/WeakMap 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. https://github.com/TooTallNate/node-weak https://github.com/TooTallNate/node-weak
- goggles99 14y agoFixed that for you ;) - 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.
- kombine 14y agoI would expect to hear something like that not from a respected tehnologist but rather from yet another "cool kid". He could just say "JavaScript is awesome" on a single slide and that wouldn't tell much less than what the whole presentation did. > 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.
- williamcotton 14y agoWhy do we need to make Photoshop in JS? I can't make a printing press in C++, but why would I want to? Photoshop was made during an era where computers were used to make media for physical printing. You would take a picture with an analog camera, digitize it, manipulate it in Photoshop, and then have it ready for print. "Save For Web" is the closest you get to using Photoshop for publishing to the web, and you'd have to admit it's a bit of an afterthought in the whole experience. Software doesn't exist on it's own. It exists in an input and output environment, beyond just mice and monitors. It exists to capture information, manipulate it, and then republish it. In many ways, memegenerator.net does a better job of consuming, manipulating, and publishing content for the web than Photoshop does. Photoshop will probably not go away. There are still printing presses and there are avenues to publish things made with them. Media tends to gain a lot of inertia by the time it gets to the point of being a household name. However, this inertia doesn't really impede some other form of media from gaining it's own momentum. Photoshop is busy being Photoshop, not memegenerator.net. If you ask my opinion, I'd say there is plenty of ground somewhere between memegenerator.net and Photoshop and there is no better language and environment to create these tools than the environment where they will be published: JavaScript running in a web browser.
- petegrif 14y agoSurely the fact that NaCl is currently led by Google should not disqualify it from being a potentially valuable contribution to web apps. Most prevalent technologies started in this way, include js. And most started in a much less 'open' way than NaCl. The point surely is not where they originate but rather whether they offer enough distinctive value that they are compelling enough to be adopted more widely and hence become a key part of our ecosystem. Hence the question is, does NaCl have such a compelling value proposition? Evidently, in Brandan's eyes, and those of several of his colleagues, the answer is no. But other people can disagree and hope that the value is sufficient to eventually win over a broader market share. A good example of such a community is those with large code bases in say C, or C++ who would rather port their code than rewrite it all with all the ensuing maintenance problems. Imho NaCl does have something distinctive to offer and I wish the project well.
- bbeausej 14y agoAren't most of these language features already in the now defunct ES4 aka ActionScript 3? I'm just wondering why that language is never mentionned when it's already a glimpse in the future for Javascript (for better or worse ... who knows!)
- adambrod 14y agoTo those who say that creating a JavaScript 2.0 would break compatibility... couldn't you have a .js2 extension and compile a .js as a fallback. The newer browser would ignore the fallback and use the js2. Thoughts?? Example: <!-- JavaScript 2.0, unsupported browsers ignore --> <script src="main.js2" fallback="main.js"></script> <!-- Fallback compiled to current JavaScript --> <script src="main.js"></script>
- bickfordb 14y agoMy jaw dropped on the byte code slides. Even though probably foolish to expect that the Javascript creator would offer non-Javascript solutions, I would guess that it would be significantly better to compile Javascript/CSS to a more efficient, stable, portable target byte code or source language (Go? Scheme? Postscript?) than to compile languages to Javascript. For example, when I played with it the Hello World ClojureScript example compiled to a Javascript file of over 100kbytes. It seems like Go and JIT'ed languages have demonstrated that extremely fast compilation of extremely efficient high level native code is possible. Long-term it seems like it would be significantly better to encode these web language extensions (new CSS/Javascript syntax) as libraries instead of as API/run-time extensions so that each new version of web languages doesn't require all the run-times (Firefox, Chrome, Safari, IE) to adopt it and old run-times to phase out. The current standards/run-time process doesn't seem to be extremely well-thought out. Has anyone on these standards communities ever had to actually build or maintain a web application?
- BrendanEich 14y ago> Has anyone on these standards communities ever had to actually build or maintain a web application? Yes.
- ezolotko 14y agoEvery time I read an article or see a presentation like this - about JavaScript, Node.js, etc I feel like I am somehow appeared in the club of very particular interest (say, leather clothes with large openings on the back). And, despite of discussing the main subject, the members every time tend to talk about world politics, religion, and science, and how all these are affected by the size of the openings on the back. Wierd.
- ehutch79 14y agoI thought we weren't supposed to use javascript directly anymore. that's why all the 'first intro to' tutorials for all the hostest frameworks are all in coffeescript.
- nwmcsween 14y agoWith regards to the comments here: I don't think pNaCl could ever happen how do you get an IR general but with enough detail to capture enough information to be able to optimize effectively and without pulling in half of llvm codegen? The issue isn't a web 'bytecode' the issue is a standardized compiler bytecode. Also haberman are you still working on the gazelle parser?