Hello,
I don't like the current state of this RFC. There is no explanation of what
problem it is trying to solve. It focuses only on the proposed solution,
while the problem space itself has not been properly explored. Because of
that, the RFC also lacks any discussion of alternatives, even though
several have already been suggested in this discussion thread.

The examples in the RFC don't add much value. Hardcoded literal types such
as `function f(1|2|3 $x): int { return $x; }` are generally considered an
anti-pattern. Enums were specifically designed for these kinds of cases.
However, the RFC does not explain why enums are insufficient for the
problem it is trying to address (which, again, is never clearly defined).

The performance section is also incomplete, as it does not compare the
proposed feature against enums.

Kind regards,
Jorg

Reply via email to