world as value
Jan Skibinski
jans@numeric-quest.com
Tue, 15 Jun 1999 09:36:28 -0500 (CDT)
On Mon, 14 Jun 1999, Martin Wierich wrote:
> Hi everybody,
>
> I want to start a discussion about Clean's "world as value" paradigm.
> The questions that always go through my mind are:
>
> How can we assign a semantics to the *World ?
>
> and if we have an answer:
>
> What semantics do we WANT to assign to the *World ?
>
> My problems with the world as value paradigm arise from the fact, that
> the world is not only changed by a Clean program, but also changes
> itself independently.
[cut]
I have been long wondering how close is the *World idea
to the following analogy taken from physics.
Consider motion of a free body, or a free particle, in
a classical Newtownian sense. Such motion is well described
by Newtonian equations. Example: free fall in space.
That would be analogous to a pure functional program.
Everything is self-contained and well defined.
Now consider a motion of the same body subjected to some
sort of constraints. Take, for example, a mathematical
pendulum. The first thing to do here is to free our
system from constraints by replacing them by unknown
reactions. In this case: one reaction force acting
along the pendulum's thread. The new system is now
free again from external influences and we can
compute both: motion of the mass and the value of
external reaction force.
The concept of substitution of constraints by
reaction forces (and possibly torques) seems
to be analogous to *World concept in functional
programs.
How valid and general such approach is in physics?
As long as our system does not influence _much_ the
external world such approach is valid _enough_.
This is a common engineering practice, but
we have to think about validity of this methodology
every time we apply it to specific cases.
In many cases such assumption is accurate enough.
But sometimes it is not. We may just do not
have any better choice and we have to proceed with such a
methodology nevertheless - knowing well that what
we model is an approximation only.
We look at some complex structure (fifteen story
building perhaps), isolate our subsystem of interest,
build our finite element model of 20000 nodes
and replace the influence of the rest of the structure
by a system of reaction forces and torques.
The last step is more often than not a source
of most errors and require a good judgement call
on part of an analyst.
Many-body problem is another example, where "semantic"
seems to be important. Take hydrogen atom made of
a heavy proton and a light electron. No matter whether
classical or quantum mechanics is employed one has
to judge whether it is valid to break the system
into two parts or to treat it as one inseparable
whole. In the first approximation we can indeed
assume that kinematics of the electron does not
influence much the motion of the proton since
their mass ratio is so small.
The proton here is analogous to *World. We assume
that proton is stationary, and solve the motion
(using Newton or Schrodinger equation) of electron only.
The electrostatic interaction is (assumed) one way only.
Which is fine, but we do not claim here that we found
a golden rule. We know well about our approximation.
If we wish to have better answers than we treat the system
as one, and not as a computable subsystem (electron) plus
a *World (proton).
From this perspective the entire concept of *World
(unique or not unique) in functional programming
seems to me a bit stretched in a sense that it
implicates perfect computability - and not just
the assymptotic one, as in physics. Just a bit
of scepticism..
Jan