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

IchorDev zxinsworld at gmail.com
Sun Nov 20 16:52:20 UTC 2022


On Friday, 18 November 2022 at 21:09:41 UTC, Walter Bright wrote:
> What happens in combination with function and template 
> overloading is not discussed.

Wrong: 
https://github.com/dlang/DIPs/blob/e2ca557ab9d3e60305a37da0d5b58299e0a9de0e/DIPs/DIP1044.md#other-considerations

On Friday, 18 November 2022 at 21:09:41 UTC, Walter Bright wrote:
> That's the simplest case. More complex cases come when there 
> are multiple overloaded functions with diverse enum arguments, 
> resulting in an unbounded combinatorial problem of which 
> combination of enum members will be selected.

I must simply disagree. Unless there's some issue with an 
implementation along the lines of my previous post, I fail to see 
how this is more than a trivial syntax change that nobody is 
required to use if they don't want to.

On Friday, 18 November 2022 at 21:09:41 UTC, Walter Bright wrote:
> [...] worse than the function overloading problem is the 
> template overloading problem, as the compiler will need to 
> instantiate the template with each combination of enum 
> inferences just to figure out what the type of the template is.)

Could you please provide a concrete example of this so I can 
better understand what you mean? (ideally one that I can run if I 
substitute out the ETI)




More information about the Digitalmars-d mailing list