Type Inference for Struct/Enum Literals

Steven Schveighoffer schveiguy at gmail.com
Sun Jul 7 23:39:11 UTC 2024


On Saturday, 6 July 2024 at 11:04:16 UTC, IchorDev wrote:
> On Saturday, 6 July 2024 at 02:49:32 UTC, Steven Schveighoffer 
> wrote:
>> Already there is pushback from the language maintainers on the 
>> concept itself (from the original review).
>
> On the contrary, Walter was pretty much on-board with enum 
> literal type inference, he just didn't like it working with 
> function overloads because he was concerned about performance 
> (which I'm pretty sure UplinkCoder already solved), and he 
> didn't want there to be a prefix; you'd just write the enum 
> member like you would in C.

My memory of it might be flawed, but I felt like the response was 
"just use with".

There is also a fundamental misunderstanding of the proposal, if 
there is some question of performance here. The decision of 
whether the thing *matches* or not is not any more expensive than 
the current overloads check.

-Steve


More information about the dip.ideas mailing list