Message from JavaScript discussions
November 2017
— I do systems architecture, I write for programmers
Maybe look into how to specify an iterable through the fantasy-land spec, and mimic those kinds of checks as well (if Symbol.iterator isn't present)
— So they are the user in this case
— It's very cool because you can easily make a lot polymorphic with less code... template engine can process an Array of Nodes or a NodeList equally with the same loop, and no glue
— Whereas, ofc, a NodeList doesn't have the brackets accessor, while an Array does... making them quite different when you try to write glue
— You get nodeList.item(int)
— Ugh
— But can't you call / apply map to a NodeList?
— And forEach / etc
— Sure, but that's an additional data structure where there was not a need for one
— Array.prototype.map.call(list, callback)
— You could do Array.from
on it