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

Lo que la cafeína le hizo a JS

Lo que la cafeína le hizo a JS

Edición extendida y revisada dada en MadridJS. Enero 2015.

Sergio Arbeo

January 28, 2015
Tweet

More Decks by Sergio Arbeo

Other Decks in Programming

Transcript

  1. Sergio Arbeo
    {Back,Front}-end developer at codecantor
    @Serabe
    Lo  que  la  cafeína  le  hizo  a  JS  
    Historia  de  un  despecho  transpilado  

    View full-size slide

  2. Sergio Arbeo
    {Back,Front}-end developer at codecantor
    @Serabe
    Lo  que  la  cafeína  le  hizo  a  JS  
    Historia  de  un  despecho  transpilado  
    Extended version,
    just not Peter-
    Jackson-extended

    View full-size slide

  3. Sergio Arbeo
    {Back,Front}-end developer at codecantor
    @Serabe
    Lo  que  la  cafeína  le  hizo  a  JS  
    Historia  de  un  despecho  transpilado  
    Extended version,
    just not Peter-
    Jackson-extended
    You know what I
    mean

    View full-size slide

  4. /Ember-js-Madrid

    View full-size slide

  5. I loved
    CoffeeScript

    View full-size slide

  6. I loved
    CoffeeScript

    View full-size slide

  7. CoffeeScript
    V
    JavaScript

    View full-size slide

  8. CoffeeScript
    V
    ES5

    View full-size slide

  9. CoffeeScript
    ES6
    V

    View full-size slide

  10. WHY?  
    Implicit returns

    View full-size slide

  11. WHY?  
    Implicit returns
    No named functions

    View full-size slide

  12. WHY?  
    Implicit returns
    No named functions
    Strange regexes

    View full-size slide

  13. WHY?  
    Implicit returns
    No named functions
    Strange regexes
    Significant whitespace

    View full-size slide

  14. WHY?  
    Implicit returns
    No named functions
    Strange regexes
    Significant whitespace
    Generators

    View full-size slide

  15. Destructuring  

    View full-size slide

  16. Destructuring  
    DE

    View full-size slide

  17. Arrays  too  

    View full-size slide

  18. NESTABLE  
    TOO

    View full-size slide

  19. Named  exports  

    View full-size slide

  20. Ember-­‐CLI  

    View full-size slide

  21. let  /  const  

    View full-size slide

  22. let  
    •  The  new  var.  
    •  Block  scope.  
    •  No  hoisRng.  

    View full-size slide

  23. let  
    •  The  new  var.  
    •  Block  scope.  
    •  No  hoisRng.  
    Actually, it does hoist, but
    raises a syntactic error at
    runtime when used before
    being asigned.

    View full-size slide

  24. Symbols  
    Interlude

    View full-size slide

  25. Symbol  
    New  primiRve  type  that  serves  as  unique  IDs.  

    View full-size slide

  26. CLASSES  
    The Good Parts

    View full-size slide

  27. STRING  
    TEMPLATES  
    Interlude

    View full-size slide

  28. Computed  
    properRes  

    View full-size slide

  29. SYMBOLS  
    Interlude

    View full-size slide

  30. Symbol  
    Can  be  used  as  property  names.  
    keys

    View full-size slide

  31. Some  symbols  
    •  Symbol.hasInstance  
    •  Symbol.isConcatSpreadable  
    •  Symbol.isRegExp  
    •  Symbol.toPrimiRve  
    •  Symbol.toStringTag  
    •  Symbol.unscopables  
    •  Symbol.iterator  

    View full-size slide

  32. {G,S}ETTER  

    View full-size slide

  33. FUNCTIONS  

    View full-size slide

  34. SPREAD  OP  

    View full-size slide

  35. 1  -­‐>  2  -­‐>  3  

    View full-size slide

  36. 1  -­‐>  2  -­‐>  3  
    14

    View full-size slide

  37. Symbol.iterator  
    12.2.4.2

    View full-size slide

  38. Most  important  =>  fn  feature  
    LEXICAL
    THIS

    View full-size slide

  39. No  Rme  for…  

    View full-size slide

  40. CLASSES  
    The not-that-good Parts

    View full-size slide

  41. GENERATOR  

    View full-size slide

  42. COMPREHENSIONS  

    View full-size slide

  43. async/await  
    ES7

    View full-size slide

  44. NAMED  EXPORTS  

    View full-size slide

  45. #  LITERALS  

    View full-size slide

  46. #  LITERALS  
    BINARY: 0b101

    View full-size slide

  47. #  LITERALS  
    BINARY: 0b101
    OCTAL: 0o67

    View full-size slide

  48. #  LITERALS  

    View full-size slide