Hi,
On 05/22/2014 04:32 PM, Michael Woerister wrote:
Lately I've been thinking that it might be nice if one could omit the
lifetimes from the list of generic parameters, as in:
fn foo<T>(x: &'a T, y: &'b MyStruct) -> (&'b int, &'a uint)
instead of
fn foo<'a, 'b, T>(x: &'a T, y: &'b MyStruct) -> (&'b int, &'a uint)
I have got this idea when I was reading
http://smallcultfollowing.com/babysteps/blog/2013/11/04/intermingled-parameter-lists/
.
It should be possible to omit lifetime parameters if there are
late-bound as specified in the mentioned article. The early-bound ones
can't be omitted. Still, it would be nice.
I have this feeling, that parameters not used for monomorphization could
and should be omitted. And late-bound lifetime parameters are not used.
Jan
-Michael
_______________________________________________
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