Isn't this still a kind of turbofish (just in the opposite direction)?
I don't think of it as that, because it's also how you call things like <*const i32>::add(p, i)
. It's more like UFCS.
Vec::<T>::new()
is turbofish. <Vec<T>>::new()
is just how you tell the compiler to parse a type instead of an expression in general.
I think @SkiFire13's point was that this thread started from wanting to remove ::<>
in some cases, and now we're talking about adding <>::
to remove ::<>
.
I'm not talking about adding anything. It already exists, so anyone can use it instead of turbofish if they'd rather for things like <Vec<T>>::new()
.
While I'm quoted on the original message. I don't think introducing a new syntax for generics is worthy in current Rust.
3 Likes