lundi 14 novembre 2016

Expected Iterator Design Pattern Behavior on extra next()

It seems to me that the Iterator design pattern should deliver a fatal error if it receives a next() command when hasnext() returns false. At least that's how I've implemented it in my SystemVerilog code.

Does a fatal error from an Iterator in this case violate some expectation of Iterator behavior?

Aucun commentaire:

Enregistrer un commentaire