O'Reilly logo

The Practice of Programming by Rob Pike, Brian W. Kernighan

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 4: Interfaces

Before I built a wall I’d ask to knowWhat I was walling in or walling out,And to whom I was like to give offence.Something there is that doesn’t love a wall,That wants it down.

Robert Frost, Mending Wall

The essence of design is to balance competing goals and constraints. Although there may be many tradeoffs when one is writing a small self-contained system, the ramifications of particular choices remain within the system and affect only the individual programmer. But when code is to be used by others, decisions have wider repercussions.

Among the issues to be worked out in a design are

• Interfaces: what services and access are provided? The interface is in effect a contract between supplier and customer. The desire is ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required