LPGhatguy / thunderdome

Arena type inspired by generational-arena
Apache License 2.0
197 stars 15 forks source link

Iterator API design #19

Closed toyboot4e closed 3 years ago

toyboot4e commented 3 years ago

thunderdome::Iter returns (Index, &T) pair. Iterator of &T would also be useful.

Arena API design choices would be:

  1. iter only
  2. iter + values
  3. iter + indexed_values (swapped version of 2.)
LPGhatguy commented 3 years ago

I think that because iterator adapters are easy in Rust, it's probably okay to have just the one type of iterator method for now.

We can revisit this in the future if the need arises. What do you think?

toyboot4e commented 3 years ago

Yes, it makes sense to me. Thank you for the clarification :)