Re:Stateless 3.0 – A State Machine Library for .NET Core
by naasking on Saturday November 12, 2016 @02:01PM
(#12939529)
Looks ok, but why not lift states to the type level and define transitions as extension methods? Then attempts to make an invalid transition are compile-time type errors.
Edit: ha, just noticed a comment on the blog saying the same thing. The example can be encoding C# too using extension methods and generic parameters.
Edit: ha, just noticed a comment on the blog saying the same thing. The example can be encoding C# too using extension methods and generic parameters.