self-ish factoring

Kyle kyle_hayes at pacbell.net
Sat Jan 6 18:40:14 UTC 2001


Though the point has been made before, it is interesting to see what other 
older languages have some similarity (at least conceptually) to Self.  Forth 
is the only language I can think of that is very similar to Self.

One of the interesting things in Forth is the concept of factoring in which 
the programmer takes a Forth program and break down the individual words and 
rearranges functionality in order to come up with a small set of very concise 
words (functions/procedures in Forth-speak) that implement the desired 
functionality.  Self (through its environment) allows this kind of factoring 
to occur, but my limited (and old!) exposure to a running Self system seemed 
to indicate that Self programs tend not to be factored as tightly as Forth.  
Forth programs and words tend to the rediculously small.

I have three thoughts as to why this is true:

1) Self has a richer conceptual programming model.  Thus, Self object can do 
more without losing comprehensibility.  A long Forth word is virtually 
incomprehensible.

2) Forth programs tend to be written by programmers who are very concerned 
about space and speed (e.g. for embedded systems).  Self programmers tend not 
to be as concerned by these things.  Thus, the programmers have different 
goals causing the programs to look different.

3) I am not looking at factoring correctly.  Perhaps I am using the wrong 
metric for determining factoring?

Factoring is a concept that operates in most languages.  However, some 
languages tend to support it more than others.  Can anyone come up with 
examples of other languages that have good factoring support?

Thoughts?

Best,
Kyle



More information about the Self-interest mailing list