`None` or `Invalid` cases in enums are a bad idea

  • by having them, you’re forcing your users into an API that forces them to think about the invalid case every time they read the value.

    2023-10-11
    • you’re repeating the million dollar mistake - null

      2023-10-11
    • instead, use an explicit Option<T> or std::optional<T> or T? or … when you need to represent a possibly-invalid case

      2023-10-11