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.

Reply via email to