News for hackers. Stuff that matters.
Re:Go Interfaces, the Tricky Parts by dullgiulio on Tuesday October 01, 2019 @02:49AM (#21122646)
But again, it's easier to solve your problem if you state it differently. Why do you want to know who implements an interface?

In a statically compiled binary, the compiler will complain at every conversion if the interface is not satisfied.

Re:Go Interfaces, the Tricky Parts by tsimionescu on Tuesday October 01, 2019 @04:06AM (#21123095)
The compiler will only complain if the intended semantics are fully expressed in the type system, which would be difficult to do in Haskell or Idris, and is completely impossible in Go. If I maintain both the consumer and the producer of the interface, it is my job to find all implementations of that interface and ensure that they respect the intended semantics.