Nope, its more philosophical than that. Imperative programming languages fundamentally break the link between equality as it exists in the real world and equality within programs.
In the purest of pure programming languages (Lisp and othe data flow variants), there is no assignment. Each variable recieves a single value and can never be updated again. Hence these languages have provably correct programs but more importantly can be understood to be correct without doind a PHD in denotational semantics.
If I have a tree in the real world, its a tree forever. If I have a tree in a program it can be a tree until I assign a car. Say what?
Sounds like you’ve just been caught out by that one. Hence the difference between = and == in Java.
LikeLike
Nope, its more philosophical than that. Imperative programming languages fundamentally break the link between equality as it exists in the real world and equality within programs.
In the purest of pure programming languages (Lisp and othe data flow variants), there is no assignment. Each variable recieves a single value and can never be updated again. Hence these languages have provably correct programs but more importantly can be understood to be correct without doind a PHD in denotational semantics.
If I have a tree in the real world, its a tree forever. If I have a tree in a program it can be a tree until I assign a car. Say what?
LikeLike
You need to read up on some real world Modal Logic, Joe!
LikeLike
Hmmm, there may be a class of problems for that, but it doesn’t look like a requirement for data upload or credit card processing…
LikeLike