Skip Navigation

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/)RU
Posts
3
Comments
394
Joined
2 yr. ago

  • Oh, then you use and_then() or something similar.

    There's also the possibility to use the guard clauses patern and do let <...> = <...> else {}.

    And finally, you can always split into another function.

    It's not straight rules. It depends on what makes it more readable for your case.

  • Those async blocks exist when doing async in traits.

    And I never said I respected the 4 level of indentations. That's exactly the point of those rules. Keep it lowly indented but still readable

  • While I totally agree with that philosophy, it heavily depends on the language.

    For Rust, my philosophy is more like this:

    • Impl + fn body don't count, as well as async blocks if they span the whole function
    • do not nest more than one if statement. You probably better using guard clauses or matches
    • do not put loops into an if statement.
    • do not nest loops unless clearly shown to be (X, Y) indexing
    • method chaining is free
    • do not nest closures, unless the nested closure doesn't have a {} block
    • do not use mod unless it's test for the current module. No I don't want to Star Wars scroll your 1000 line file. Split it.
  • I'd even add that now 99% of the distro have a gui over the package manager. Have an android or iPhone? You already have experience in installing stuff in an easier way than windows

  • Snapshots are definitely a hit or miss with me. I nearly never use them, but when I need to recover a file it's awesome. The only system related problem I had with Nvidia drivers but it was actually better to reinstall so it does all the install configuration itself

    Although the most problems I had with it is backup of data. I tend to hoard too much