LateBinding (ThoughtStorms)

According to AlanKay : We need to do more building of important software structures, and we need to do it in a form that allows analysis, learning, and reformulating the design and fabrication from what has just been learned.

There seems to be a bit of a chicken and egg problem here. If we don't really have an engineering discipline, then won't it be too difficult to make big constructions that are also understandable enough to learn from? And won't the mess we've made be too difficult to reformulate to give us a chance to understand whether our new findings really have value?

I believe that the secret weapon that can be used to make progress here is extreme late binding. Of what? Of as many things in our development system as possible.

*One can make a good argument that most of the advances in both hardware and software design have been facilitated by introducing new latebinding mechanisms. Going way back in hardware, we can think of index and relocation registers, memory management units, etc. In software, we went from absolute instruction locations and formats, to symbolic assemblers, to subroutines, to relocatable code, to hardware independent data structure formats, to garbage collection, to the many late binding advantages of objects, including classes and instances, message sending, encapsulation, polymorphism, and metaprogramming. *

Human late binding

Over at I I complained abot SqueakLanguage and the fact it sticks to the smalltalk Red, Yellow, Blue 3-button mouse :

: Basically LateBinding is a wonderful thing ... when the computer does it. But the Squeak interface wants the benefit of late-binding your hardware to an abstract interface model, where the user has to remember the transformation between the two.

OTOH Wiki's ConcretePageNames are an interesting case. They're concrete, so the page-names are statically bound to the contents of the pages. (And that's OK, because names are connected with page contents by the semantics of your natural, human language). But at the same time you can make a link to a page which may or may not exist. And this will only matter at browse-time. That smells pretty late.

More things bound late == more flexible software. The key to sophisticated software systems is move beyond imperative, structured programming. And this involves introducing a new kind of late binding : the binding of names of actions to blocks of code at run-time.

This comes in two flavours : FunctionalProgramming and ObjectOrientedProgramming. In FP, functions are first class citizens, so one function can receive another as an argument. In OO, late binding occurs through polymorphism : when I pass message m to object o as in o.m() which block of code m is bound too depends on the class of o at the moment the line is executed.

Both FP and OO are fundamentally ways of getting late binding of names to blocks of code. However, they are different the way poetry and prose are different. You can use either to tell a profound truth about the world but your strategy is different.

Prose works with more or less ordinary language. To tell a profound story, you must skillfully organize a lot of it, carefully modelling the truths you wish to capture. The structure of your story is everything. Plotlines and characters must ring true. The dramatic arcs must create the right flow. Counterpoints must be balanced.

Poetry is different, you do not expect to write many words, nor are you necessarily troubled by large scale structure, but you must make every line do more work. Your lines will not be ordinary but will have a special exoticism : they must be multiply overloaded with meaning. (FractalLoading?)

OO is, of course, prose. The lines look and act more or less like the familiar lines of C or Pascal. Modelling and structure are everything. Late binding of names to blocks of code occurs, of course. But is rigorously constricted and well organized. FP is poetry. The lines look weird. Like poetry it's all about ambiguity. The ambiguity of things whose shape is not fixed but radically reconfigured at runtime.

See also : BradCox's ideas static and dynamic binding outlined in this video :

Contrast :

See also :

CategoryComputerScience CategorySoftware, CategoryDesign