On Tue, Jan 7, 2014 at 7:28 PM, Ben Kloosterman <[email protected]> wrote:

>   Why on earth not? Surely if the collection type is frozen we need not
>> consider any possibility of that exception happening!
>>
>
> So everytime you have a shared mutable collection in a multi threaded
> environment on which your searching to determine elements to remove your
> going to create a new type and copy the elements  by which time the
> original collection may have changed.
>

That's not what I said at all. I said that when we know the collection is
immutable we can derive that no CollectionChanged exception is possible,
and we can exploit that knowledge.


>  What you called "unsafe foreach" is a reason to reject the contractor
>> who ever uses it, and preferably to blacklist the programmer who inserted
>> it.
>>
>
> Im certainly NOT suggesting a generic unsafe foreach but a qualifier used
> in some cases
>

What I said. If the compiler cannot *prove* that unsafe foreach is in fact
safe, then it isn't safe. Period. Calls to external code are different.
Their signature says what the contract is. If the implementation fails to
honor the contract, bad on ya.


shap
_______________________________________________
bitc-dev mailing list
[email protected]
http://www.coyotos.org/mailman/listinfo/bitc-dev

Reply via email to