Loading...

James Long: Unshackling JavaScript with Macros [JSConf2014]

4,101 views

Loading...

Loading...

Transcript

The interactive transcript could not be loaded.

Loading...

Loading...

Rating is available when the video has been rented.
This feature is not available right now. Please try again later.
Published on Jun 11, 2014

JavaScript is thriving, but the language itself is shackled to the long process of ECMA standardization and implementation in all engines. We have to wait many years for a simple feature like variable destructuring.

Macros allow you to extend a language with new syntax and semantics, just like you would build new APIs on top of native ones. There's no reason the language itself shouldn't be extensible, which allows it to grow naturally.

sweet.js is a project that implements robust hygienic macros for JavaScript. I will explain how this works and why it's such an exciting idea. I will show how you can already have ES6 variable destructuring, classes, fat arrow syntax, and more just with a few macros. In addition, you can use things like function tracing, native pattern matching, better assertions (logs contain the original expression), and much more. sweet.js macros track the original source location and generates sourcemaps, so debug away like normal! Let's unshackle ourselves from the mire of standardization, and take control of the language we love!

http://2014.jsconf.us/

Loading...

When autoplay is enabled, a suggested video will automatically play next.

Up Next


to add this to Watch Later

Add to

Loading playlists...