DIP1044---"Enum Type Inference"---Formal Assessment
Paul Backus
snarwin at gmail.com
Tue Apr 25 16:51:36 UTC 2023
On Tuesday, 25 April 2023 at 04:54:43 UTC, Mike Parker wrote:
> I submitted DIP1044, "Enum Type Inference", to Walter and Atila
> on April 1. I received the final decision from them on April
> 18. They have decided not to accept this proposal.
IMO this is the correct decision. While a feature like this would
be nice to have, it's not of critical importance, so we can
afford to have high standards for the quality of the proposal.
During the review process, there was some discussion in the
community Discord about generalizing this idea, of literals with
"holes" that the compiler can fill in, to other types of data
beyond just enums. Perhaps it could even be unified with pattern
matching--e.g., you could use a pattern as a literal outside of a
`switch` or `match` statement, and the compiler would attempt to
fill it in based on the context.
I can't say with confidence that such a proposal would be
accepted (the concerns about top-down vs bottom-up inference
still apply), but I personally would be excited to see one.
More information about the Digitalmars-d-announce
mailing list