Implementing typestate
Tobias Müller via Digitalmars-d
digitalmars-d at puremagic.com
Tue Sep 15 13:34:43 PDT 2015
Tobias Müller <troplin at bluewin.ch> wrote:
> I think they settled for a simpler library solution using a marker type (I
> think it was called Phantom type) as template parameter and then using
> local shadowing to emulate mutable type state. Multiple variables with same
> name but different (marker) type.
> There's a Blog post somewhere but I can't find it atm.
Ok found it:
http://pcwalton.github.io/blog/2012/12/26/typestate-is-dead/
Tobi
More information about the Digitalmars-d
mailing list