I know, it is yet another language hack, just like the iota/const dance, instead of proper language constructs.
var _ Foo = (*Bar)(nil)
The statement asserts that Bar struct pointers are assignable to a Foo interface.I do agree it’s not as clean looking as the Java implements keyword, but it’s already a fairly terse pattern and IMO the inconvenience does not justify introducing new language syntax.