-
Notifications
You must be signed in to change notification settings - Fork 54
Strict iterator_to_array, do not overwite duplicate keys #13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
ef63534 to
533f578
Compare
533f578 to
ce5460e
Compare
Doesn't really make sense to me. This would effectively kill ALL maps and first class collections. 👎 from me.
Hmm now that I think about it, this is actually trickier than I thought. You don't lose the items, but you do lose the keys, which might be important. Thank you @Majkl578!
You definitely lose keys and you may lose items if there are duplicate keys (then last one wins). But generally this is similar i.e. to array_merge() or +. :)
Agreed, closing this 😊
This has shot us in a foot a couple times, especially when
yieldingfroman inner generator inside a generator.