Abstraction
easy 40 minShow what a thing does, hide how it does it.
Watch lesson4:38
Where it shows up
The same pattern appears across everyday software.
Linux VFS
The kernel documentation describes it as the layer that provides the file system interface to programs, and as an abstraction that lets different file systems coexist.
TCP
RFC 9293: a reliable, in-order byte-stream service. Lost and reordered packets are hidden. Delay is not, and that is its famous leak.
Java `List`
An ordered collection, with array and linked insides. The marker `RandomAccess` exists so that algorithms can ask whether access by index is fast: a leak, named.
JDBC `Connection`
A session with a specific database. Programs use the interface, and drivers of the databases implement it.
Go `io.Reader`
One method, `Read`, that wraps the basic read. Files, sockets, archives and strings all provide it.
PostgreSQL index access methods
The core knows nothing about indexes beyond the interface in this chapter of the manual. So new index types can be added as extensions.
Kubernetes CRI
A plugin interface that lets the kubelet use many container runtimes without recompiling the cluster components.
SLF4J
A simple facade for several Java logging frameworks. The program chooses one when it is deployed.
Python `collections.abc`
Abstract base classes to test whether a class provides an interface, for example whether it is hashable or a mapping.