Hacker News new | ask | show | jobs
by yawaramin 1146 days ago
Mostly the former. The compiler infers the type of the implementation and ensures it conforms to the interface. But, you can further restrict the interface's type to hide details from the outside world.