JQueryUK and the Future of Javascript


My initial plan to spot someone who looked jqueryey and follow them turned out to be completely unnecessary.  The White October guys doing the organising had strategically placed friendly people with large pointers and painted white rabbits feet on the ground leading all the way from the train station, past several gawping ducks and geese along the river side to the conference centre.

The style of the conference continued with a Lewis Caroll theme running through everything.  The 3m tall dragon that greeted you as you entered the building turned out to be a jabberwocky and was also featured on some rather cool jquery uk t-shirts that all attendees received.

After chatting to the guys from Infragistics and getting a tea and coffee in the sponsors hall, we were all ushered into a large hall to begin the conference proper.

The conference guide took the form of a deck of laminated cards with the speakers details on the obverse.  The Ace of Spaces took the stage: Brendan Eich.

Javascript : The Future

Brendan covered two main areas in his talk; the exciting things coming up in ecmascript 6 and the amazing performace gains that have been made through the use of emscripten and asm.js.

Although “Harmony is like a family that has gone through some hard times”, it’s been exciting to see people finally getting on board.  Brendan characterised Microsoft’s attitude to the process as “No, Never! No, No, Yes.”  And while it will be some time before the whole standard is finalised and widely implemented, he encouraged us to start using it soon, since parts have already been implemented in all the major browsers.

Then we got a whistle stop tour of all the features that are coming up.

arrow functions  / classes / Object.mixin (super will work with mixin) / modules / symbols / private syntax (@ not dot) / default parameters / rest parameters / spread operator / iterators, generators, for of (based on an iterator symbol) / Comprehensions / Maps with arbitrary keys / Sets / weakmaps / proxy (allows no such method)

It sounds like there’s been a lot of inspiration from Python, but that’s a good thing. We’re certainly excited about a these and a lot of the audience seem pretty stunned by the rapid fire revelation of feature after feature.

Brendan also addressed some common complaints, like ‘callback hell’. At the same time as talking about some of the things that could be done (maybe promises in es7?), he did say that he thought a lot of the complaining was overdone: “there’s too much whining about nesting”. He’s thinks the right answer is a combination of generators and a library called spawn.js which allows you to write ‘straight line code’ that looks synchronous but is actually asychronous.

One of the challenges of ecmascript 6 is to improve the experience both for developers writing javascript and also make it a better language target for other languages to be compiled to. Brendan talked about why javascript is better than bytecode (it’s similarly dense, it’s higher level, it’s not future hostile,
it’s safer) but said “For now, we’re serving two masters, humans and computers.  May the best animal win.”

We got a brief plug for firefoxOS phones, e.g. from geeksphone but apparently a number of manufacturers are on board, including Sony.

Then we jumped into the next part of the talk – the things that have been done to make the web ready for triple-A games. According to Brendan, triple A games are the wrench dodging of the software world. If you can run a triple-A game, you’ll be able to run nearly anything.  And then he showed us firefox doing
just that, loading up the Unreal Engine Citadel demo live, and finally playing a few rounds against some bots in first person shooter Sanctuary.  The bot ‘Torque’ drew first blood, but Brendan managed to get some applause for shooting ‘Matrix’.  The graphics were beautiful and the performance was in excess of what most people
would have ever expected from a browser scripting language.  They’d managed to achieve this by transpiling from C++ to a subset of heavily optimisable javascript.  That was enough to elicit a ‘Bloody Hell’ from someone behind me.

In the Q&A section, an interesting question was raised about how to ‘protect’ your javascript code. Brendan said that the Mozilla Foundation is strongly opposed to most forms of DRM.  He spoke passionately against having ‘policemen’ in your computer controlling what you could do with it.  He said that actually, very
few of the organisations they were collaborating with were too worried about their source code being extractable but he also spoke about considering pragmatic solutions to help provide rental models which customers seem to want. He mentioned a watermarking approach, which apparently many of the online video providers are moving towards, and seems to be a better approach.

Write ups for the other talks coming up soon – I just have  a hack day to go to first!

Related Posts with Thumbnails

There are no comments yet, add one below.

Leave a Comment