Feedback Thread: DIP 1044--Enum Type Inference--Community Review Round 1

IchorDev zxinsworld at gmail.com
Fri Nov 18 17:19:11 UTC 2022


On Friday, 18 November 2022 at 16:38:47 UTC, Paul Backus wrote:
> This kind of vagueness is acceptable in a draft, but cannot be 
> allowed in the final DIP. The description of the proposal must 
> be complete and unambiguous.

I presume this means that the list of cases must therefore be 
exhaustive?
I might need help from some experienced implementers to work 
through that, since there are probably many aspects of D's syntax 
that I am unfamiliar with. For instance, mixing enum types with 
`int`s in an array literal causes it to be `int[]`. Should ETI 
work in that case? The easy answer is "no". However, what if D 
already has a mechanism for figuring out what types have already 
been used in an array literal? If so, then ETI could work in that 
example without a special-case, unambiguously. I'd love if any 
implementers would like to talk about these sorts of cases on the 
discussion thread. If they are of the opinion that D's 
pre-existing implementation will not be hindered in the slightest 
by ETI having very precise implementation requirements, then I 
don't see why I can't write an exhaustive list of cases myself.

Hopefully that clarifies things.


More information about the Digitalmars-d mailing list