[-] [email protected] 2 points 1 day ago

Because you don't control third party libraries

[-] [email protected] 2 points 2 days ago

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 2 days ago

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

[-] [email protected] 6 points 3 days ago

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

[-] [email protected] 12 points 3 days ago

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 3 days 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] 5 points 1 week ago
[-] [email protected] 8 points 1 week ago

For european languages I usually recommend learning using an ANSI keyboard and using the EurKey layout (I installed it on Linux/Mac/Win and Android for a hardware keyboard without any issues). That way you have a larger choice in custom keyboards and a lot of Keyboard shortcuts make more sense (because software usually seems to be written for ANSI keyboards).

But I'm not sure how that would go with Cyrillic.

[-] [email protected] 10 points 2 weeks ago

Mace is a brand of pepper spray.

[-] [email protected] 4 points 3 weeks ago

Not sure if that's a little boy or an old lady.

[-] [email protected] 7 points 1 month ago

Stock GNOME doesn't have tray icons. If your distribution does show them, they probably preinstalled an extension for you (like Ubuntu does).

view more: next ›

al4s

joined 2 months ago