Upgrade to Pro — share decks privately, control downloads, hide ads and more …

JS Adventure

JS Adventure

"Choose Your Own JavaScript Adventure"

The JS standard only gets you so far. Want to really step up your game at writing code? You gotta make your own JavaScript.

Yeah, yeah, ES6 is awesome. Everyone knows that. We’re all excited about not having to write the word ‘function’ anymore. But, isn’t it about time we stop obsessing so much about what TC39 puts into the official language spec?

Let’s talk about making and using tools (built in JS, of course!) to customize the language itself to your own liking. We’ll talk about macros, code parsers and transpilers, and other fun tricks to put the control of the language back in your fingers.

Make your own JavaScript. And no, that doesn’t have to stop you from playing nicely with others.

Kyle Simpson

October 10, 2014
Tweet

More Decks by Kyle Simpson

Other Decks in Programming

Transcript

  1. You are Brendan Eich, employed at Netscape in May 1995.

    Your boss asks you to design a new language for the browser, but gives you only 10 days to complete it. Choose your next adventure! To agree and give it your best shot, turn to page 39. To laugh and walk away, turn to page 262. pg 16 pg 17
  2. You’ve learned the ins and outs of JavaScript, but lots

    of things still “bug” you. [] == ![] is just too unbearable to go on. Choose your next adventure! To give up on JS and move to go, turn to page NaN. To explore your own custom JS, turn to page 2 . 01e+2. pg 402 pg 403
  3. vs.

  4. • esprima/acorn (parser) • escodegen (code generator) • escope/eslevels (scope

    analyzer) • istanbul (code coverage) • estraverse (analyze AST) • eslint (pluggable code linting rules) • plato/jscomplexity.org (complexity)
  5. • auto-correct misspellings • safely re-arrange scope • consolidate declarations

    • automatically reduce complexity • refactor boolean traps • optimize performance • ...