Discussion Thread: DIP 1044--Enum Type Inference--Community Review Round 1
IchorDev
zxinsworld at gmail.com
Wed Nov 23 04:55:39 UTC 2022
On Tuesday, 22 November 2022 at 15:42:27 UTC, TheGag96 wrote:
> On the topic of the `:ident` syntax: It sounded good at first,
> but then I thought about our struct initialization syntax and
> our new named arguments syntax:
>
> ```d
> ColorPair pair = {
> fg : :red,
> bg : :green,
> }
>
> someFunc(fg : :red, bg: :green);
> ```
>
> Seems kind of ugly. `.identifier` and `#identifier` are the
> best options IMO (but both unavailable lol). Implicit is decent
> I guess but looks kind of spooky.
Hmm. `#identifier` is so nice huh. I know `#line` might be niche,
but I don't want to break it. It's got to be pretty useful for
automated bindings. It is such a small part of the language that
the thought crossed my mind, but I don't think the people using
it would be pleased.
More information about the Digitalmars-d
mailing list