Day 3: Mull It Over

Megathread guidelines

  • Keep top level comments as only solutions, if you want to say something other than a solution put it in a new post. (replies to comments can be whatever)
  • You can send code in code blocks by using three backticks, the code, and then three backticks or use something such as https://topaz.github.io/paste/ if you prefer sending it through a URL

FAQ

  • kintrix
    link
    fedilink
    English
    arrow-up
    3
    ·
    1 day ago

    My guess is because a linter and/or HLS was suggesting it. I know HLS used to suggest making your fields strict in almost all cases. In this case I have a hunch that it slightly cuts down on memory usage because we use almost all Muls either way. So it does not need to keep the string it is parsed from in memory as part of the thunk.

    But it probably makes a small/negligible difference here.

    • Leo Uino@lemmy.sdf.org
      link
      fedilink
      arrow-up
      2
      ·
      1 day ago

      Yep, HLS suggested it, and I figured since I’m definitely going to be using all of the values (in part one, at least), why not?

      Normally I ignore that kind of nitpicky suggestion though.