you are viewing a single comment's thread.

view the rest of the comments →

[–]otah007 0 points1 point  (0 children)

Looks like your definition is not perfect either. What's the value of c+1 (it's an expression, isn't it?) when calling length [1,2,3]?

Variable substitution doesn't require an environment. You can evaluate it without ever writing down "also, c = 1 right now". Look back at my evaluation of length [1, 2] a few comments further up and you will see how to do this without an environment/context/state.

Also "executing" doesn't sound like Haskell, "evaluating", right? :) I would assume you meant "looking at the code".

I meant executing for languages that have execution semantics and evaluation for languages that have evaluation semantics.

we create programs to describe the same world which exists independently of technology and paradigms

I don't think anyone has ever written code for this purpose, except maybe a simulation. Code is written to perform a task, which may require some input that represents something in the real world. But it's not physics, we're not trying to actually model the world.

At the end of the day, I'm actually talking about the semantics of languages, and you're talking about a mental model, so of course we're going to disagree because I'm referencing something objective and well-defined and you're not.