Freyskeyd / environment

6 stars 2 forks source link

Improve interop by giving users access via `into_iter` and maybe `iter` instead of `compile` #7

Closed epage closed 6 years ago

epage commented 6 years ago

The current approach should work with inter_iter. iter would require moving the inheritance logic into the fn inherit.

This also ensures the data structure used for implementation isn't exposed.

Freyskeyd commented 6 years ago

@epage

I think it will be complicated. Because Environment implement From<T> which is used to do thing like: [("FOO", "BAR")].into() to create an Environment object.

It will be a conflict implementation I think. If you have any suggestion I'm fully aware :)

epage commented 6 years ago

I'm confused. Why would implementing the InterIterator trait and adding a fn iter to your impl conflict with From? HashMap has similar collection of trait and fn's.

Freyskeyd commented 6 years ago

What do you call InterIterator?

epage commented 6 years ago

Bah, I keep repeating a type for IntoInterator

Freyskeyd commented 6 years ago

fix by #10