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

Walter Bright newshound2 at digitalmars.com
Wed Nov 23 23:53:23 UTC 2022


On 11/21/2022 5:19 PM, Timon Gehr wrote:
> I guess the two-pass thing is how function literals work, so you'd do that?

Function literals are pretty much treated as templates.


> The DIP does not propose trying all combinations. You'd get number of function 
> overloads copies for each occurrence of $a. It's not exponential and without 
> overloading (I think this is the majority of cases in typical user code) it is 
> one copy.

The combinatorics matter, they can't be done incrementally. But I suggest 
abandoning the ETI for overloaded functions.


More information about the Digitalmars-d mailing list