dotnet / orleans

Cloud Native application framework for .NET
https://docs.microsoft.com/dotnet/orleans
MIT License
10.13k stars 2.04k forks source link

Contribution idea: Support for F# classes as GrainState #865

Closed johnazariah closed 8 years ago

johnazariah commented 9 years ago

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.

sergeybykov commented 8 years ago

Resolved by https://github.com/dotnet/orleans/pull/1060.