• Sunrosa@lemmy.world
    link
    fedilink
    arrow-up
    0
    ·
    4 months ago

    One of the reasons i find it so hard to use non-Rust languages is how ugly they typically are by comparison. “fn” instead of “function” is such a great example of saving key presses where they’re most needed. And you get very used to seeing compact abbreviations. Idk if that’s what you’re talking about though.

    • Lucy :3@feddit.org
      link
      fedilink
      arrow-up
      1
      ·
      4 months ago

      Rust:

      fn getofmylawn(lawn: Lawn) -> bool {
          lawn.remove()
      }
      

      C:

      bool getofmylawn(Lawn lawn) {
          return lawn.remove();
      }
      

      With Rust you safe 1 char, and gain needing to skip a whole line to see what type something is.