Message from JavaScript discussions

July 2017

— Is there a documentation on good practices/fast code for javascript?

— 

Beginner: https://github.com/getify/You-Dont-Know-JS
Design Patterns: https://addyosmani.com/resources/essentialjsdesignpatterns/book/

— Ty

— Yup, but harder to keep things from getting tangled

— Right now the implementation passes around a big fat flyweight that is hard to understand

— I mean, from months ago when I first wrote it

— 

function newIterationState() {
return {
continue: true,
skipNode: false,
tuple: {},
iterations: 0,
length: 0,
existing: null,
isContainer: false,
invertedIndex: false,
isLast: false,
isFirst: true,
loc: null
};
}

Message permanent page

— Very obscure how this changes behavior, the IDDFS poops it out on every iteration next

— IDDFS mutate this, then the external diff and clone functions mutate it

— It is a nasty thing

— Ugh

— Don't use new in object creators