On 4/17/11 1:30 PM, Rafael Ávila de Espíndola wrote:
Yes, that should help. Since we don't have shared mutable state there is more opportunity to delay the checks. Are destructors allowed to have side effects like sending messages in a channel?
I think we have to allow them to. Otherwise you couldn't e.g. close a file in a destructor.
If they are we could still build crazy cases like sending a partially computed sum of two arrays via a channel.
That's true. But I think we can avoid this unless the programmer actually allocates a resource during a loop we would like to autovectorize. Resources are only allowed to close over immutable values, so the only way a resource could refer to the partially computed result would be if the resource was constructed during the loop.
Patrick _______________________________________________ Rust-dev mailing list [email protected] https://mail.mozilla.org/listinfo/rust-dev
