These are chat archives for boostorg/hana

24th
Feb 2017
Scott Santucci
@ScottFreeCode
Feb 24 2017 00:29
Are there any good techniques for working with Hana and enums? (I might just ask myself to reevaluate what I'm using an enum for and see if I can't create a class that does it at least as well and interoperates with Hana directly, but I figured I'd ask before reinventing the wheel.)
Jason Rice
@ricejasonf
Feb 24 2017 00:34
I don't think Hana has anything for working with enum. I personally don't use them at all.
Scott Santucci
@ScottFreeCode
Feb 24 2017 02:59
The more I think about it, the more I suspect I don't need to get Hana to do anything with them because what I'd be doing would be better done in Hana without them. At least, for the use case I have in mind at the moment.
I mean, I basically want a fixed/closed set of named, unique values. I should be able to come up with a way to get that in Hana's natural paradigm of compile-time type programming with values holding types, rather than trying to come up with a way to hack introspection onto enums or something like that. Or at least, my intuition is wiggling its eyebrows and gesturing in that general direction.
Scott Santucci
@ScottFreeCode
Feb 24 2017 03:11
...Oh. I should really think through what I need at compile-time and what I need at runtime and see if traditional C++ programming would suffice anyway.