News for hackers. Stuff that matters.
Re:Sum Types Are Coming (2015) by masklinn on Friday February 16, 2018 @11:24AM (#16393425)
> I may have gone overboard; I found it hard to write procedural code in F#, so I split up my procedures into steps, with a type to model each step and a sum type to model the whole procedure.

State machines are a great thing, and modelling a state machine as a sum type is reasonably common (it's not the best modelling for all state machines, but it's very good for many).

Re:Sum Types Are Coming (2015) by sevensor on Friday February 16, 2018 @11:33AM (#16393502)
I'm glad to see I'm not totally crazy for adopting that pattern! As I'm new to the language, I'm not sure whether I'm holding it right.