On 01/01/14 01:15, Oren Ben-Kiki wrote:
Not to re-ignite the thread about this, but one way `proc`s aren't
sufficient because they are send-able (that is, allocated on the
heap). Rust lacks a call-once stack-allocated closure types, which are
immensely useful for manipulating container elements, creating DSL-ish
syntax, etc.
(Nitpick, being sendable and being allocated on the heap are independent
in general. e.g. int is sendable, but isn't heap allocated (if we get
unboxed closures that capture things by value, we'll likely be able to
send them too despite not necessarily being heap allocated), and ~(@int)
is heap allocated, but isn't sendable.)
That's separate from the `decltype` issue, though.
On Tue, Dec 31, 2013 at 3:55 PM, Armin Ronacher
<armin.ronac...@active-4.com <mailto:armin.ronac...@active-4.com>> wrote:
Hi,
On 30/12/2013 17:29, Patrick Walton wrote:
Is `proc` not sufficient? We could prioritize adding unboxed
closures,
but since they're backwards compatible as far as I know, I
don't see a
major need to add them before 1.0.
Procs can be called once.
_______________________________________________
Rust-dev mailing list
Rust-dev@mozilla.org
https://mail.mozilla.org/listinfo/rust-dev
_______________________________________________
Rust-dev mailing list
Rust-dev@mozilla.org
https://mail.mozilla.org/listinfo/rust-dev