by Aeolun · 4y ago · 0 comments
shared T
shared mut T
> Specify a lifetime? (`&'a T` is a reference to T with lifetime `a`)
shared T lifetime a
> Specify a raw pointer? (`const T` and `mut T` are const/non-const raw pointers)
const point T
point mut T
> Specify that the argument is moved into the function? (just the raw type `T`)
T
I do disagree on the syntax for the references though. I prefer they be easier to type than the owned versions (eg &[u8] vs Vec<u8>) as this can promote the usual better choice (this is a weak argument, I acknowledge).
I do wish that history had chosen a different symbol for references though. But there's only so much we can do now