Skip Navigation
Which code style to initialize structs?
  • 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
    };
    
  • Which code style to initialize structs?
  • 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.
  • Recommendations for (european) multi-language use
  • 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.

  • Recommendations for (european) multi-language use
  • 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.

  • InitialsDiceBearhttps://github.com/dicebear/dicebearhttps://creativecommons.org/publicdomain/zero/1.0/„Initials” (https://github.com/dicebear/dicebear) by „DiceBear”, licensed under „CC0 1.0” (https://creativecommons.org/publicdomain/zero/1.0/)AL
    al4s @feddit.org
    Posts 0
    Comments 14