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
An interesting feature of the Grok TiddlyWiki interface: it has the sidebar on the right.
I see a sidebar on the left way more often, but arguably it makes more sense on the right for a wiki? The content is effectively more prominent.
Optimising GHC, implementing assembly pretty-printers, and the tradeoffs of implementing against an interface: https://www.tweag.io/blog/2022-12-22-making-ghc-faster-at-emitting-code/
I certainly see the appeal of ChatGPT as a conversational interface for knowledge questions, but it's wrong often enough that I can't trust it.
Prompt: What does :extend do to an Emacs font face?
This is wrong (it's confused with :inherit) and it's hallucinated a version constraint.


