3 ms·
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 ty
by naasking 10y ago
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.