Flaw with typed enumerators in F202X

@zedthree Your paper sounds very convincing to me. Granted I have no clue about the Fortran standard process, that might not mean a lot…

Exhaustive select statements fall under the same category in that it would be very difficult/impossible to add in a later revision (one would have to invent a new syntax). Personally I think that is an incredibly important feature, but I wonder if anyone else does so?

Of the languages @zedthree list in the paper, the following do require exhaustive matching:

  • C++ (when using std::variant)
  • Java (with the new pattern matching syntax)
  • Rust (always)
  • Switft (always)
  • TypeScript (though only through separate tooling)
  • Golang (though only through separate tooling)
  • Python (though only through separate tooling)

The following languages don’t require exhaustive matching:

  • C#
  • D
  • PHP

The following languages, I’m not sure about:

  • Ada
  • Raku