by ObviousScience · 11y ago · 0 comments
They're nothing like arrays, except that you can iterate over them. That is, they're no more like arrays than trees, lists, and other iterable data structures are like arrays, which is to say, not particularly.
But you can't implement a promise using an array. The array will never "magically" come to life a couple of seconds after you last touched it and do something. And that's the whole point of the gist.
Do you also consider functions to be syntactic sugar? Because you can also implement them in terms of a switch statement.