Type Inference for Struct/Enum Literals

Richard (Rikki) Andrew Cattermole richard at cattermole.co.nz
Tue Jul 9 04:54:54 UTC 2024


On 09/07/2024 4:48 PM, IchorDev wrote:
> On Tuesday, 9 July 2024 at 03:57:47 UTC, Richard (Rikki) Andrew 
> Cattermole wrote:
>> It is used quite heavily to mean that the variable isn't used for say 
>> foreach statements.
> 
> ‘Used to mean’—I use it for that too, but it’s a convention not a 
> language feature. (Unless it’s undocumented?)

There is nothing special about it, its just a variable called ``_``.

>> We will not be diverging from C's identifiers.
> 
> Fortunately there are plenty of good prefixes that don’t require 
> diverging from C’s identifiers.

Yes, I need to talk to Walter about the member-of-operator ideally at 
next monthly meeting to unblock my sum type work.

It is a very restrictive subset of this, which may take some convincing 
as he has some very strong opinions that do impact performance. An 
expansion can come later to introduce Identifier Type's as described in 
this thread with expanded use cases.

>> We are in the process of bumping the version from C99 to C23.
>> I can say this on behalf of Walter, due to that bump being something I 
>> had to fight for.
> 
> And thank you for doing that!

I'm happy to do it, it should be the only bump we will ever need to do.


More information about the dip.ideas mailing list