News for hackers. Stuff that matters.
Re:Memory Safe Languages in Android 13 by masklinn on Thursday December 01, 2022 @04:13PM (#33822843)
> Explicit is better than implicit.

Not only that, but in Rust it actually has a meaning. Self can be &self or &mut self, which impacts the calling conventions.

The alternative would be fully typing anything but owned method calls which would just not have a self parameter, which would be incredibly weird.

It also shows that as in Python (and really even more so) "methods" are little more than syntactic sugar for functions. It would also require a new and separate syntax to declare non-instance methods.

Re:Memory Safe Languages in Android 13 by afdbcreid on Thursday December 01, 2022 @06:13PM (#33824394)
It can also be `self: Box<Self>` or `mut self: Pin<&mut Self>` or `self: Box<Arc<Rc<Self>>>` if you feel brave.