Hacker News new | ask | show | jobs
by dbecker 5054 days ago
I don't think the relationship between a language's model of computation and the physical computing mechanism is particularly important. It's more important for a language to follow our MENTAL model of computing. Fortunately, the mental model of computing can change over time as you become familiar with new paradigms.

The same thing can be said about "which model of computation resemble physical reality." Each of us can have different mental models of physical systems. Personally, the functional paradigm is closer to my mental model than declarative, but imperative still feels the most natural. This isn't a statement about reality, but rather about how you think about it.

1 comments

I think there is a confusion here: our "mental" grasp of a physical process and intuition is tightly related to how the world works. We develop our intuition from real-world experience. They're not two separate things. This's also why quantum physics is so non-intuitive for us, and why we struggle dealing with it (counter-intuitive it is, we do it anyways, because that's just the way the Nature works --it's not something man-made like Lisp). That being said, the physical processes don't depend on people's understanding. Physics doesn't depend on how you think about the world. The quantum state (or a classical state) is there, and it won't go away just because you want mathematical elegance or try to see things in a different way in your inner world as hard as you can.

That being said, of course it matters the way you write your software. There is a huge gap between actual CPU instructions and Lisp. Between Lisp and the machine is an automated, soft layer of emulation, which may or may not be optimal and is extra work anyway.

There are plenty of ways of accurately representing reality that don't rely on mutable state.

F=MA is a function, and it isn't mutable. I could calculate force from some other function (e.g. Gm1m2/r^2). I can compose those functions together to get a new function. Still nothing mutable. I could continue this to create a model of a physical system that turns into one big function. That function models the system, and it can take some outputs to give whatever outputs you want. All without storing state internally.

So, it's certainly possible to accurately represent physical systems without keeping track of state along the way.

Please tell me you were trolling. Or that you're 10. Otherwise go read some basic mechanics from Goldstein's Classical Mechanics. And learn some basic mathematics.

Classical state of a particle lives in the 2n-dimensional manifold known as phase space. The coordinates of the phase space are the configuration space and the corresponding conjugate momenta. The state is a single point on the phase space, corresponding to the initial conditions of the problem. The Hamiltonian determines the time evolution in the phase space, which is a trajectory.

To make is simpler for you to understand: 1. Position and momentum couples form the physical state. And of course, for any physical system, it exists. 2. You need 2 initial conditions to solve a 2nd order differential equation. You can't solve a differential equation without initial conditions (of course to use this fact, you would need to understand that F=ma is a differential equation, not a function) (Maybe it's better if you read some good introductory text, such as Feynman Lectures on Physics Vol 1, Chapter 9).

If still not clear for you: the initial state in a two body problem is determined by the initial position and velocity. They are the initial conditions of your "function" F=ma, which is actually a second order differential equation. F determines how this initial state will change over time.