al4s

joined 2 months ago
[–] [email protected] 7 points 19 hours ago

ChatGPT is not a reliable source of information, I thought that was clear to everybody by now

[–] [email protected] 8 points 22 hours ago

The processor architecture does not influence RAM usage. (At least not if both architectures are 64-bit)

[–] [email protected] 2 points 6 days ago (2 children)

I mean you'd still expect that critical security fixes would land in testing, no?

[–] [email protected] 2 points 1 week ago

Because you don't control third party libraries

[–] [email protected] 2 points 1 week ago (2 children)

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.

[–] [email protected] 2 points 1 week ago (2 children)

You can have setters that set private fields, there are also sometimes structs with mixed private and public fields

[–] [email protected] 5 points 1 week ago (4 children)

Yeah if you have the second option, use it, but if the struct has private fields it won't work.

[–] [email protected] 12 points 1 week ago (10 children)

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
};
[–] [email protected] 21 points 2 weeks ago

Definitely the second one.

  1. It avoids Mut
  2. 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.
[–] [email protected] 6 points 2 weeks ago (6 children)
[–] [email protected] 2 points 3 weeks ago

I think the app I used was called "more physical keyboard layouts" or something like that. It's for connecting physical keyboards though. Never felt the need to have it for the virtual keyboard, since you have all of the weird letters behind a long press anyways.

[–] [email protected] 5 points 3 weeks ago (1 children)
view more: next ›