New programming paradigm
Malte
no at valid.mail
Sun Jun 3 09:52:01 UTC 2018
On Saturday, 2 June 2018 at 23:12:46 UTC, DigitalDesigns wrote:
> On Thursday, 7 September 2017 at 22:53:31 UTC, Biotronic wrote:
>> [...]
>
> I use something similar where I use structs behaving like
> enums. Each field in the struct is an "enum value" which an
> attribute, this is because I have not had luck with using
> attributes on enum values directly and that structs allow enums
> with a bit more power.
>
> [...]
You might want to have a look at
https://wiki.dlang.org/Dynamic_typing
This sounds very similar to what you are doing. I never really
looked into it, because I prefer to know which type is used and
give me errors if I try to do stupid things, but I think it's a
cool idea.
More information about the Digitalmars-d-learn
mailing list