Alternative Possibility - Implicit with

zjh fqbqrr at 163.com
Sun Nov 20 01:07:14 UTC 2022


On Saturday, 19 November 2022 at 08:49:31 UTC, Walter Bright 
wrote:
> 
>
> Advantages of this scheme:
>
> 1. doesn't need the special `$` which people don't seem to 
> like, and using `.` conflicts with existing use
>
> 2. makes use of the already present `with` semantics
>
> 3. seems to have a natural feel to it


Can I open `one or more` 'enum' namespaces for a function, 
because sometimes, enum values are continuous,and you do not need 
`'switch'` statements. At this time, I still want to omit 
`'enum'` names' to use the `values`.

Similarly, can we also open the 'namespace' of `one or more` 
classes or structs for a function.
In this way, just like a `'free functions'`, you can directly use 
the 'static' function in the 'class/struct'.

How about this?



More information about the Digitalmars-d mailing list