[rust-dev] names needed for function types

Brian Anderson banderson at mozilla.com
Sun Jan 1 00:20:16 PST 2012



----- Original Message -----
> From: "Kevin Cantu" <me at kevincantu.org>
> To: "Marijn Haverbeke" <marijnh at gmail.com>
> Cc: rust-dev at mozilla.org
> Sent: Thursday, December 29, 2011 4:06:07 AM
> Subject: Re: [rust-dev] names needed for function types
> 
> So, if Rust did away with block, renaming block to fn, would the
> behavior of fn definitions be preserved?  Could the unified fn become
> a type that could sometimes be used in places requiring a sendfn or a
> lambda, but not always??

I think named fn's would not have a type. When you take their value it creates whichever function type is needed.

> 
> Earlier, I was imagining a hierarchy like fn < sendfn < lambda <
> block, where it would seem logical to just knock it down to fn <
> lambda < block. But there are things I have to learn about sendfn vs.
> lambda...

For a long time I also imagined a complete ordering, but it's difficult to achieve.


More information about the Rust-dev mailing list