FILE* is an example of object-oriented C. It can refer to a file, device, standard stream (like stdin), or in POSIX, anything that can use a file descriptor such as sockets or pipes. Some extensions add a form of inheritance. If fmemopen and open_[w]memstream (which are in POSIX-2008 and TR 24731-2) get added to the C standard then FILE*s could be used as automatically managed buffers. Instead of worrying about buffer overflows or whether data is in static, automatic or dynamic memory, or in a file, device, or socket, just pass a FILE*. fopencookie could be used to replace wrappers around FILE* like the gzFile used by zlib with real FILE*s. These can be used with other wrappers forming a stack. The cookie_io_functions_t is like a table of virtual methods.