PURPOSE OF THE EFFORT
My experience is that learning a new language usually makes me a
better programmer the other languages I already know, as it enlarges
my working vocabulary of concepts that I can apply to future
programming tasks.
1) I believe that a simple conceptual model that can explain and
predict the behavior of REBOL language features will help me (and
others) to understand and use REBOL more effectively.
2) I believe that if that model is compatible with well-understood
concepts and terminology from computing science, it will be much
easier to explain REBOL to a programmer already familiar with
other languages.
3) I believe that such a model makes it easier to lay REBOL on the
table beside other languages and objectively discuss
strengths/advantages and weaknesses/disadvantages, thus
demonstrating caces where REBOL is a good tool to use.
To pursue these three goals -- the last two of which I hope will
benefit the entire REBOL community -- I have attempted to draft
parts of such a model and submit it to the REBOL community for
consideration.
THE IDEA OF "MODEL"
This is not the only possible model. I have no inside knowledge
of the implementation of the REBOL interpreter. The purpose of the
model is to describe concepts and predict results, not to map
directly to the code of the interpreter.
As a tiny example, one could model the 'even? and 'odd? functions
(considering only integer arguments, to keep this tiny example tiny)
by saying that they reflect the state of the low-order bit of the
argument. Based on that model, I conclude that if
even? a
evaluates to true for a given value of a, then
odd? a + 1
will evalutate to true, because I already know that adding one to
an integer produces a result with the opposite low-order bit.
It is important to note that this is a valid prediction, even if the
REBOL interpreter (or my current computer hardware) doesn't
represent integer values in binary. Again, the issue is whether the
model makes accurate predictions.
LAST WORDS OF INTRODUCTION
To cut down on verbiage, the draft is written as if composed of
statements of fact. Please assume that the phrase "As I currently
understand it, this model should say" applies to every statement.
(continued in essay/1)