Hacker News new | past | comments | ask | show | jobs | submit login

An interface is the intersection between the system and the environment.

An implementation is the system minus the interface

These definitions seem at odds with each other. The first sentence would imply that the interface is part of the implementation, but the second says that the implementation and the interface are exclusive. What do you feel you gain by defining things in this way, as opposed to saying something like "the interface is the portion of the implementation with which the system interacts"?




Yes, this was something that bugged me as well. In the article, I touched on this by noting that it makes sense to also think of the "contract" definition of an interface. Meaning that the "contract" is really just a set of intentions or guarantees, so it doesn't really 'take up any space'. It would almost seem appropriate to use infinitesimals from calculus when trying to measure how much of the system is composed of the interface. A good interface should be clearly visible from the outside, but it should be as lean as possible to avoid overconstraining what the system can do.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: