Jake Kerr wrote:
I find the syntax for lifetimes to be quite hard to get used to since
it overloads the & operator to mean something different, and because
the convention seems to be to name the lifetime 'self' inside methods,
which overloads that meaning as well. So now just in the method
signature you have &self in three places that mean two separate things.
Many people mention the convention of using the name `self` to refer to
the main lifetime parameter as confusing. It seems likely that we
should change this convention! I've been talking about redesigning some
of the lifetime stuff to be less implicit, this may help here as well.
All of the casting (is it casting?, I'll use that term as I don't know
the correct one. ) to local variables with said lifecycle, is also a
bit noisy and hard to parse. It would be nice if there was syntax such
that the lifecycle could be applied as the variables are bound in the
match deconstruction.
I agree those casts are ugly; as I said in my earlier e-mail, though,
those are actually there as a workaround for a bug.
Niko
_______________________________________________
Rust-dev mailing list
Rust-dev@mozilla.org
https://mail.mozilla.org/listinfo/rust-dev