[Squeakland] Computer Language Definitions and Intelligibility

Jecel Assumpcao Jr jecel at merlintec.com
Fri Jul 7 17:09:48 PDT 2006

Greg Smith wrote:
> ["extreme late binding"]

This is a very important concept in computing. So much so that in a five
lesson "course" I am planning most of one of the lessons is dedicated to
this. Sadly, if you ask most computer science graduates about this they
probably won't know the answer either.

Supposing that neither "extreme" nor "late" are giving you any problems,
I will focus on "binding". In computing we use that word to indicate
that two things have become associated somehow. Imagine you are setting
up a new company and sit down to write the following organizational

President: ??
Sales: John
Engineering: me
Accounting: ??
Marketing: Sally

What we have here is a set of bindings between jobs and people. In the
case of the first job the binding actually hasn't been done yet, so we
can say that the job of president is "unbound" so far. For the second
case we can say that the job of sales is "bound" to John.

Now imagine you are writing a program to do some statistics for the
grades in your class. Since you have 18 students you might write at some

 .... 1 to: 18 do: ...

And everything will work just fine. Until you give the program to a
friend that has a class of 21. Or your own class grows or shrinks. So
you might want to change your program so that the size of the class is
defined every time the program is run. This requires adding the concept
of a "variable". Imagine we have such a variable with the name
"classSize" (this odd kind of spelling is very popular in Smalltalk)
which is bound to the size of the class when the program starts to run.
We can rewrite that program fragment to

.... 1 to: classSize do: ...

Now your friend can use your program just fine. In the first version of
the program the size of the class was bound very early - when the
program was still being written. In the second version the size of the
class was bound later - when the program starts to run. Changing
constants to variables and generally binding things later rather than
earlier tends to make programs more flexible and powerful.

We learn new things as time goes on and early binding forces us to make
choices which might not be right later on. If you haven't decided on a
president and accounting person yet it might be because you hope to talk
to more people and find out things you don't know right now. If you can
delay the decision you will probably be happier with your final choice
than if you are forced to pick somebody today.

I hope this helps,
-- Jecel

More information about the Squeakland mailing list