• @calcopiritus
    link
    25 months ago

    I don’t understand what the advantages of const expressions are.

    Isn’t const { None } the same as just None?

    • @[email protected]
      link
      fedilink
      75 months ago

      const expressions are evaluated at compile time and can be used in locations where you would have to otherwise specify a literal (or something that amounts to a named literal like a const value).