All that ails us in programming…
..is the confusion between the equals operator in maths and the assignment operator in most programming languages.
..is the confusion between the equals operator in maths and the assignment operator in most programming languages.
June 13th, 2007 at 9:16 am
Sounds like you’ve just been caught out by that one. Hence the difference between = and == in Java.
June 13th, 2007 at 9:55 am
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?
June 17th, 2007 at 1:39 am
You need to read up on some real world Modal Logic, Joe!
June 17th, 2007 at 10:06 am
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…