> On Tue, Aug 26, 2008 at 8:31 PM, Michael <mdkraj...@gmail.com
> > As I read through it I was struck how the analogy of teaching a child
> > is just so... imperative.
> Was some particular material that made you notice this?
Its just the imagery of how one might instruct a child.
> > I assume that the authors may be somewhat predisposed to encourage
> > people to consider functional programming. To me this underscores
> > that at some primitive level imperative and functional programming may
> > be intertwined.
> Please elaborate.
> Do you mean this?http://www.wisdomandwonder.com/article/527/sequencing-in-scheme
Hmmm, now that you point it out that is one way of highlighting the
To me imperative simply means an explicitly ordered sequence of
Functional programming defines functions and evaluation rules which
implicitly define the sequence of operations.
So they both yield sequences of operations, but how that sequence is
arrived at may differ.
> > That and that it may be hard to talk about computing without some
> > starting assumptions, and the ones that lead to an imperative
> > computing model come to mind pretty easily.
> Sequencing is how we understand the world, we are bound to time. As I
> write this, I wonder how I would define "imperative programming". Now,
> I couldn't.
> I could only say the difference is whether or not the language has
> side-effects, that is the gotcha.
I think side effects is a different issue. You can be side-effect
free and still imperative (by my definition).
And if you want to get even more philosophical, are we bound in time
or flowing with it? If time is a river are we on the shore or in a
I guess its all relative, the invariants remain the invariants. But
your choice of reference frame can have profound effects on how you
model the world. In classical mechanics there are two very different
approaches to setting up the mathematics of moving objects, one is
Hamiltonian - fixed to the point of reference of the object that is
moving - the other is Laplacian - fixed in space and describing the
flow of matter past a point in space. Hamiltonian is the prefered way
of doing kinematics, Laplacian is more useful for fluid flows (even
including magnetic effects - thats how magneto-hydrodynamics is
derived). But both start with conservation of mass/energy.
Systems that are Hamiltonian are better described by programming
systems that have side effects. Particle quantities such as momenteum
are treated as variables which are updated (side effects) where as the
stream-of-values approach that emerge from Laplacian descriptions are
how side effect free systems model change over time.