On 6/6/11 3:46 AM, Stefan Lampe wrote:
My comments may not be that relevant to rust as I haven't been following
in detail, so please ignore if they aren't - but at the moment I write
quite long functions that do a lot of transformations of data in ocaml -
lists of data, pipelines of maps, folds, etc. The inability to have
lightweight anonymous records means that I end up often using lists of
tuples where lists of records would be preferable. In these cases the
record type would only exist for the lifetime of the next map or fold,
and the overhead of a type declaration (including thinking up a name) is
too cumbersome.

Well, it sounds like those records escape the lifetime of the function, in which case you still need a type declaration in Rust. This may change if we get type-inferred lambdas.

Also note that Rust supports function-local typedefs, so you don't need to come up with a globally-unique identifier.

Patrick
_______________________________________________
Rust-dev mailing list
[email protected]
https://mail.mozilla.org/listinfo/rust-dev

Reply via email to