- 0 Posts
- 9 Comments
Joined 1 year ago
Cake day: July 22nd, 2024
You are not logged in. If you use a Fediverse account that is able to follow users, you can follow this user.
al4s@feddit.orgto DeGoogle Yourself@lemmy.ml•Google Gmail now filters email from EU to spam, which is deleted after one month0·4 months agoAh yes, googles brilliant plan to destroy the EU by maliciously sending mail from europe.eu to the spam folder.
Because you don’t control third party libraries
A scope groups the initialization visually together, while adding the
let app = app;
feels like it just adds clutter - I’d probably just leave it mut in that case.
You can have setters that set private fields, there are also sometimes structs with mixed private and public fields
Yeah if you have the second option, use it, but if the struct has private fields it won’t work.
If you’re ever forced to do something the second way, you can also wrap it in braces, that way you end up with an immutable value again:
let app = { let mut app = ... ... app };
Definitely the second one.
- It avoids Mut
- It makes clear that the initialization is over at the end of of the statement. The first option invites people to change some more properties hundreds of lines down where you won’t see them.
Me breaking a phone by kicking it into a wall. I always instinctively try to catch it with my foot, and it never works out so well.