DIPX: Enum Literals / Implicit Selector Expression
Nick Treleaven
nick at geany.org
Fri Dec 3 18:06:01 UTC 2021
On Friday, 3 December 2021 at 04:58:51 UTC, Dave P. wrote:
> Except that `with` introduces a new scope
There was a proposal (with an implementation) to allow `with`
without braces:
https://forum.dlang.org/post/bwudoaknbiodwilvldxl@forum.dlang.org
> and can’t be used at file scope:
That should be made to work.
> with(Flags){ // Illegal
> auto f = FOO | BAR;
> }
> ```
>
> With is also very noisy syntactically when all you want is to
> use enums in a nicer way.
Fair point, but is there a simple solution to that without
ambiguity drawbacks?
More information about the Digitalmars-d
mailing list