[self-interest] (Aspects) Utilities in Lisp vs Design Patterns in Smalltalk- Self
Jecel Assumpcao Jr
jecel at merlintec.com
Tue Apr 22 21:57:43 UTC 2003
On Monday 21 April 2003 13:27, Albertina Lourenci wrote:
> First of all I would like if someone explain to me
> if there are differences between bottom-up programming
> and exploratory programming.
This is way off topic, but here is a short reply:
Imagine that a program A is made up of components B, C and D. Suppose
that component C is made up of subcompenents E and F. This is a tree
structure, right? As is usual in computer science, imagine the tree
with the root (A) at the top.
If you create this program by starting with A and ending with E and F
you will be doing "top-down design". "bottom-up design" goes in the
opposite direction.
A problem with top-down design is that A can't really run if B, C and D
haven't been created yet. So the very first time you get to run the
program is when you have finished writing it! One solution is to create
small "place holder" components that are dummy versions of B, C and D
so you can test A and see if it works.
With a proper interactive environment (such as Self) you can test E as
soon as you have written it. A more static environment would not allow
you to call E from a command line and would make you write a program to
call it (a dummy C, for example).
Many people plan ahead in a top-down fashion and then program in a
bottom-up way. Others actually prefer to first think about the low
level components (leaves of the tree) and play around with them
exploring what they can do before moving on the the next level.
A language like Forth forces you to program bottom-up since everything a
"word" refers to when it is defined must have been previously defined.
Lisp and Self allow references to things that might not yet exist.
Aspects are "cross-cutting", as you said yourself, and would represent
an entirely different direction compared to the up/down axis.
-- Jecel
More information about the Self-interest
mailing list