Enumerators. They suck.

BlitzMax Forums/BlitzMax Programming/Enumerators. They suck.

plash(Posted 2010) [#1]
Why can't we use EachIn on enumerators without giving the enumerator an ObjectEnumerator method, which is probably going to point to itself anyways?
Why isn't there a TEnumerator type we can extend so that the compiler just knows when an enumerator is an enumerator?



Using a base enumerator:



Brucey(Posted 2010) [#2]
I thought enumerators were rather cool... :-)


N(Posted 2010) [#3]
Generic Enumerator


Warpy(Posted 2010) [#4]
haha, I was staring at this at work, thinking "I'm sure I've done this before," and it turns out I have! Nilium's code is inspired by mine.


plash(Posted 2010) [#5]
I was just venting. I have no desire to use a reflection-based generic enumerator (probably slower, too); I'll be using my own base enumerator for now.