2 ms·
Well, it's a good compromise to avoid having a 'iterate' method on the object prototype, which would risk name collisions, etc.
by thomasfoster96 11y ago
Well, it's a good compromise to avoid having a 'iterate' method on the object prototype, which would risk name collisions, etc.
- bpicolo 11y agoThey could do it a'la python __iter__ or something of that nature. I think the python strategy is a bit cleaner. (Even then __iter__ could be a keyword meaning Symbol.iterator if that's the way to do it). Mixing symbols in for something that seems asymptotic is the strange part.