F# is an excellent language for designing application domains and bounded contexts, using algebraic data types to model state with greater precision than traditional languages like C# (a.k.a "making illegal state unrepresentable").
However, we cannot currently use F# types to represent grain state because not all F# types can be made to derive from GrainState or implement IGrainState. DU types, in particular, cannot do this.
It would be immensely useful to be able to be able to use F# types (which compile down to CLR types) as GrainState regardless - perhaps with some attribute to decorate those types if required.
F# is an excellent language for designing application domains and bounded contexts, using algebraic data types to model state with greater precision than traditional languages like C# (a.k.a "making illegal state unrepresentable").
However, we cannot currently use F# types to represent grain state because not all F# types can be made to derive from
GrainState
or implementIGrainState
. DU types, in particular, cannot do this.It would be immensely useful to be able to be able to use F# types (which compile down to CLR types) as
GrainState
regardless - perhaps with some attribute to decorate those types if required.