Layered Programming

Many programs today are written at a very high level. They are run in an interpreted environment, not a compiler. Often many different components running in different interpreted environments are hooked together. HTML and XML, for example, started out as markup languages, but now they are often also used as components of programs hooking together the output of different servers.

Computer programming has always been based on layering and abstraction. The processor abtracts the transistor, the traditional programming language abstracts the processor, the kernel abstracts the hardware. What seems fairly new to me is the speed at which these layers change and their complexity. New ideas are implemented in the form of extensive libraries. Each library can be learned in isolation, but there is no unifying principle across libraries.

It is becoming increasingly difficult to be a systems expert. When I learned to program, it was possible to understand your entire program from the source code, in whatever language, down to the machine code. When writing a modern Ajax application, that is simply impossible. There are too many different interpreters. There is too much code involved. Even fixing on a new base level above the processor–perhaps the browser–doesn’t help. This all leads to decreased performance, which is sometimes important, and decreased security, which is often important.

We can’t go back. What I wonder is whether we will again cohere to a programming model which can be understood at all relevant layers. Or whether things are just going to get increasingly complicated.


Posted

in

by

Tags:

Comments

4 responses to “Layered Programming”

  1. omkar Avatar
    omkar

    Thats exactly the concern of Joel Spolsky in his beautiful article named “The Law of Leaky Abstractions”

    http://www.joelonsoftware.com/articles/LeakyAbstractions.html

  2. Ian Lance Taylor Avatar

    Thanks for the link. You’re right, and that was six years ago.

  3. ncm Avatar

    As in all early Spolsky columns, there’s a bit of nonsense right in the foundation. I think we call this one “selection bias”: the abstractions Joel notices are the ones that leak. The overwhelming majority of abstractions are airtight and invisible, at least to Joel. (You haven’t noticed any iron nuclei decaying lately.) Joel has perhaps more experience with leakiness than most of us, from his time at Microsoft.

  4. […] Airs – Ian Lance Taylor » Layered Programming “What I wonder is whether we will again cohere to a programming model which can be understood at all relevant layers. Or whether things are just going to get increasingly complicated” (tags: programming model complexity) […]

Leave a Reply