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

They're functional! They're efficient!! They're persistent data structures!!!

They're functional! They're efficient!! They're persistent data structures!!!

Functional programming is a cool paradigm to work in, because avoiding mutable objects can save you a lot of headaches! But when you’re using only immutable objects, you have to create a new object each time something changes, which means copying even the parts that didn’t change! This can slow things down, and you might even run out of memory!

Fear not: persistent data structures to the rescue! They save you time and space when modifying objects, by reusing parts of the old object that you don’t need to change! Let’s find out what that means and why it is SO AWESOME! And let’s learn how to easily use these structures in JavaScript!

(Given at !!Con 2016 - http://bangbangcon.com/)

Anjana Sofia Vakil

May 08, 2016
Tweet

More Decks by Anjana Sofia Vakil

Other Decks in Programming

Transcript

  1. 0RUL KWWSVVZDQQRGHWWHJLWKXELRPRUL Q<MAÓHJMD‰Q@>OJMŸ¼†½ ‡ Q<MRÓHJMD‰>JIEŸA†¾ ‡ Ɣ &ORMXUH6FULSWSRUW Ɣ )XQFWLRQDO$3,

    Ɣ )DVW ,PPXWDEOHMV KWWSVIDFHERRNJLWKXELRLPPXWDEOHMV Q<MAÓ HHPO<=G@‰DNO‰JAŸ¼†½ ‡ Q<MRÓA‰KPNCŸ¾ ‡ Ɣ -6WKURXJK WKURXJK Ɣ 3XEOLFPHWKRGV Ɣ $ELWVPDOOHUWKDQ0RUL -DYD6FULSW