Niko Matsakis wrote:
It's a tough balancing act. Sigils are bad but then if things are too concrete that's bad too.
Re-reading this mail, I'm not sure if I interpreted your e-mail correctly. I think I was responding as much to thoughts in my own head as to what you wrote. What I meant to say that sometimes verbose types like Region<'t, int> (which you did not propose, of course) can be hard to read too if things get too explicit. Anyhow, we have to find a notation that's as readable as possible, to be sure.
The slashes are visually hard to parse, I think everyone agrees. Imagine this: `&a/B/c/d/e`. That would be a legal type under that proposal and I think it's pretty darn confusing vs `&'a B<'c, 'd, 'e>`
To be clear, what I don't like about &a/B/c/d/e is that it is hard to extract the structure. I think the use of `<>` is better in that respect. I also like `<>` because lifetime parameters on types are exactly analogous to type parameters and so I hope that `<>` provides some intuition for that. That is, just as `Option<int>` means "a type that's just like the definition of Option but with int in place of the type parameter", `Foo<'a>` would mean "a type just like Foo but with the lifetime 'a in place of 'self".
regards, Niko
_______________________________________________ Rust-dev mailing list [email protected] https://mail.mozilla.org/listinfo/rust-dev
