Should constraints on stat types be more stringent? #23
greenstack
started this conversation in
Polls
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Is there a use case for allowing class objects to be used as a numeric stat, or should stats be restricted to struct value types? Alternatively, should we just add the
notnullconstraint? Worth considering is thatnotnullwouldn't break any existing code bases, so that wouldn't be a breaking change; restricting stats to only value types (structs) would be breaking from an API perspective.The way I see it is that most of the time, the developer is going to want to wrap the stat around a value type anyway (such as
intorfloat). Supporting classes would be more flexible, though. At the very least, I'd want to havenotnulladded.Are there any other constraints that might be useful for stat types in general?
0 votes ·
Beta Was this translation helpful? Give feedback.
All reactions