Marcus Stade (2014-04-09T20:51:40.000Z)
domenic at domenicdenicola.com (2014-04-15T15:38:44.379Z)
I don't think I'm making my case very clear, my apologies. Hopefully, I'll be able to clarify in this message. > No enforcement is required by the specification. If you create an iterator > that doesn't fully conform to the iterator interface specification and then > get surprising results, its your fault, not the implementation's. This is the very point I'm trying to make: the spec uses language such as "must" when declaring how iterators should behave, yet an implementation isn't as you say required to enforce such behavior. In this case, I am getting "surprising results" because the spec seems to say that the way I've implemented the iterators above is flat out wrong; yet, the code runs just fine and sugar such as `for..of` is working just as it would with a fully conforming iterator. If it quacks like a duck.. I might be reaching, but I do think the language is confusing. If the intent is to convey a practice or precedence set by the built in iterators, then perhaps it's better to make this explicit or use words such as "recommended" instead of "must". Perhaps I'm bike shedding, in which case I apologize. I hope I've made my point clearer any way. Ps. I like what Scott's saying, which I *think* is pretty much what I'm trying to say as well, albeit I'm doing a poorer job at it.