There were several threads about this,
https://mail.mozilla.org/pipermail/rust-dev/2013-October/006105.html for
example. I don't see how that code can be converted to RAII at all. Sure it
can be done with cells, or possibly with tuples (though, well, doing this
_manually_? <<shudder>>). It really just begs for
stack-allocated-once-closures.


On Sat, Nov 30, 2013 at 11:28 PM, Patrick Walton <[email protected]>wrote:

> On 11/30/13 11:38 AM, Kevin Ballard wrote:
>
>> The problem here is that the type system already understands the idea
>> of a `once` fn, it just has an artificial limitation that means it
>> can only apply that to a heap closure and not a stack closure.
>>
>
> No, it's merged with the idea of a heap/stack closure. Separating them out
> into separate axes would increase type system complexity.
>
> Patrick
>
>
> _______________________________________________
> Rust-dev mailing list
> [email protected]
> https://mail.mozilla.org/listinfo/rust-dev
>
_______________________________________________
Rust-dev mailing list
[email protected]
https://mail.mozilla.org/listinfo/rust-dev

Reply via email to