# A mathematical foundation of reflexion?

Laurent Martelli martelli@iie.cnam.fr
13 Jan 2000 05:31:38 +0100

```>>>>> "Massimo" == Massimo Dentico <m.dentico@teseo.it> writes:

Massimo> A truly interesting reading is also:

Massimo> "Thoughtful Programming" -
Massimo> http://www.ultratechnology.com/forth.htm

Massimo> ==================================================================
Massimo> - http://www.ultratechnology.com/forth2.htm#swb

Massimo> [...]

Massimo> Stacks are great (for Forth) so use them.  Chuck has said
Massimo> "Don't use locals."  You have a stack for data, this is
Massimo> Forth, locals are for a whole different picture.

Massimo> [...]

Massimo> - http://www.ultratechnology.com/forth2.htm#metric

Massimo> [remember that a colon definition is a procedure
Massimo> difinition] As a metric I did some analysis of code
Massimo> examples Chuck has provided.  The numbers I find most
Massimo> interesting is that the length of the average colon
Massimo> definition is 44 characters.  The length of the longest
Massimo> colon definition was 70 characters.  This is a sign that he
Massimo> has factored, factored, factored.  How big are the average
Massimo> definitions in your code?  Smaller definitions are easier
Massimo> to code, easier to test, etc.

And harder to understand when there are too many of them. It is easier
to understand a program made of a single 10 lines function than one
made of 10 function of one line. But of course, a program made of 10
function of 10 lines is easier to understand than one made of one
function of 100 lines. For most people I think.

--
Laurent Martelli
martelli@iie.cnam.fr

```