Message from JavaScript discussions

January 2019

— Doesn't every loop make integer iteration?

— 

var sum, i$, ref$, len$, a;
sum = 0;
for (i$ = 0, len$ = (ref$ = array).length; i$ < len$; ++i$) {
a = ref$[i$];
sum += a;
}

— Wow, this is already terrible

— Why doesn't for..in compile to for..of?

— I dont see that, so i dont care🤤

— Because it's slower

— But it works on more types

— It uses the iterator protocol

— Better, doesn't have to care what the input is

— As long as it's iterable

— I specify the correct type, that's how dynamic languages beat static type world

— Less paths, more productive work