News for hackers. Stuff that matters.
Re:Go's power is in emergent behavior by philsnow on Saturday April 26, 2014 @09:42PM (#7653539)
the purpose is to not be able to use the interface outside the module, right? why wouldn't you just use an interface type with a lowercase name, which wouldn't be visible outside the module?
Re:Go's power is in emergent behavior by bslatkin on Saturday April 26, 2014 @10:16PM (#7653631)
You want to be able to use the interface outside the module, but not allow anyone else to implement that interface.
Re:Go's power is in emergent behavior by Laremere on Saturday April 26, 2014 @10:23PM (#7653648)
The purpose was to not allow defining types which satisfy the interface outside the package. In this case they still want others to be able to use the values of the interface.

It's an uncommon thing to need to do, but this example shows that you can do it.