News for hackers. Stuff that matters.
Re:Memory Safe Languages in Android 13 by going_ham on Thursday December 01, 2022 @04:03PM (#33822702)
* `@` is already used for pattern matching, so it can't be used for that; the brackets are necessary to allow more freedom in what kind of stuff you can put in those directives

* `fn` and `mod` are super common and mostly just to make the language LL(1), complaining that they're hard to understand is like complaining that the average person couldn't guess that `//` denotes comments; `let mut` is chosen over `var` to prevent people from just using `var` everywhere and opting out of const correctness

* makes parsing deterministic

* unlike in python, `self` can be passed in multiple ways, such as `&self` or `&mut self`, so you need to specify somehow and this is more elegant that the C++ east const

* `::` is for static dispatch, `.` for member access, there are cases where both are valid and distinct

There are no comments on this comment yet.