• Eager Eagle@lemmy.world
    link
    fedilink
    English
    arrow-up
    15
    ·
    edit-2
    9 hours ago

    This! There’s also a longstanding open issue on rust to allow a similar way to pass keyword/named arguments. IMO every modern language should have something like this. Makes all the difference when reading code.

    Inlay hints from your editor are a good help, but this should be built into the language.

      • Eager Eagle@lemmy.world
        link
        fedilink
        English
        arrow-up
        4
        ·
        6 hours ago

        you can have a better data structure in any language, but rarely someone will bother doing that for booleans

        • Traister101@lemmy.today
          link
          fedilink
          arrow-up
          2
          ·
          3 hours ago

          Right cause the boolean isn’t a named type. If you have two possible states that can be represented with a boolean, or an enum of the two possible states which embeds more info into the callsite