axiom-developer
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Axiom-developer] Consistency (was Lazy Evaluation)


From: William Sit
Subject: Re: [Axiom-developer] Consistency (was Lazy Evaluation)
Date: Thu, 23 Jun 2005 06:51:38 -0400

Bob McElrath wrote:

  William Sit wrote:
> > In general, I do not like that the result of a command depends on its
> > screen location.

> A worksheet is read from top to bottom, as a document, not a
> batch-system-dispatcher.  As a document, it should make sense if I read
> it in order.  The idea that a command's result is independent of its
> screen location forces the user to keep considerable state information
> in his head.  By putting the state information into the document, in
> order from top to bottom, the user is freed from having to keep *any*
> state information in his head, because he can simply read it off the
> document.
> 

I don't disagree that most *finished* worksheet read from top to bottom, and the
commands run from top to bottom, but that need not be the norm. Document is a
good analogy: modern documents are not linear, because we now have hyperlinks;
we can, and want to, skip around! A program is the same, the code need not be
linear in structure: we may have parts A, B, C in parallel followed by D that
depends on A, B, C; code can even have a circular structure (like Axiom
domains). Compilers do code optimization by exploring the non-linear structure
of the code.

During development of this final product, just like writing any essay, we gather
together ideas, pieces, expand them, rearrange them, put them into sections,
chapters. Until the document is finished, it is *not* consistent! The state of
consistency is approached only gradually. So in developing a computation
worksheet, as I often do in Mathematica, I start with exploratory routines, test
ideas, revise, expand, change, etc and finally reorganizing this into a logical
sequence of commands. The entire sequence is not necessarily linearly ordered,
as the location of some functions (especially those defined with SetDelayed,
which I would consider as library functions) are unimportant except for grouping
into some theme. The main executable (using immediate assignments) sequence
would be linear mostly. 

 Why should I need consistency during the development? If I am only working on
one single subroutine, why shouldn't I be able to test this in isolation? If I
keep track of dependencies with SetDelayed, there is no need to worry about the
eventual consistency. Even if I can place code in  a linear space order, why
can't I prefer just a linear logical order? All I need is consistency of the
final code, which if it works, is automatic.

For developers, it is the revision cycle that is time consuming. I would like to
have all the freedom available.

William




reply via email to

[Prev in Thread] Current Thread [Next in Thread]