Crell / enum-comparison

A comparison of enumerations and similar features in different languages
80 stars 7 forks source link

ReflectionEnumConst for ADT compatibility #62

Closed iluuu1994 closed 3 years ago

iluuu1994 commented 3 years ago

It might be better to make ReflectionEnumConst and interface and rename ReflectionEnumConst to ReflectionUnitEnumCase. This way, when we add ADTs we can create a ReflectionTaggedUnionCase (or what have you) that will be based on ReflectionMethod (or maybe completely separate).

Crell commented 3 years ago

RFC has been updated. Leaving this open for implementation. Close when implemented.

iluuu1994 commented 3 years ago

I actually think we should completely drop ReflectionEnumCase until we actually add ADTs. Otherwise it's just an empty interface. Using that in the reflection methods would be completely useless as then you'd just have to assert that it's a unit case.

iluuu1994 commented 3 years ago

Adjusted in the RFC and implemented.