Interesting approach to emulating sum types in Go: define an interface with a placeholder function on all of the relevant types! https://www.jerf.org/iri/post/2917
Includes an example with an AST type. You can even stop people extending your interface by making your placeholder private.
miniblog.
Related Posts
Amazing project building a NES cartridge with a Raspberry Pi inside emulating a colour SNES! The explanatory video is impressive and thoughtful too.
JS emulating hardware running Smalltalk: we're coming full circle: http://t.co/XArAUyZcve
