Open waneck opened 11 years ago
[comment from back2dos@gmail.com, published at 2013-05-19T06:34:32.000Z] Very good idea.
But for one, I'm not sure Abstract really makes sense. The only usage I see is ExprOf
Lastly, having Class and Enum unify with {} seems rather sensible to me. When accessed in an untyped manner, they do behave exactly as object. Or is this behavior only incidental?
[Google Issue #1826 : http://code.google.com/haxe/issues/detail?id=1826] by si...@haxe.org, at 2013-05-17T22:24:10.000Z It would be nice if we could get a few more "constraint types" like EnumValue, Class and Enum: Function: unifies with any function Abstract: unififes with any abstract type FlatEnum: unififes with enum instances if all constructors of its enum type have no arguments [something to replace the Dynamics in Reflect]: unifies with {}, Class and Enum, i.e. anything that has fields (alternatively we can make {} unify with Class and Enum)
I'm thinking about adding a haxe/Constraints.hx file containing these.