All that ails us in programming…

..is the confusion between the equals operator in maths and the assignment operator in most programming languages.

4 Responses to “All that ails us in programming…”

  1. Paul Browne - Technology in Plain English Says:

    Sounds like you’ve just been caught out by that one. Hence the difference between = and == in Java.

  2. Joe Says:

    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?

  3. Paul Campbell Says:

    You need to read up on some real world Modal Logic, Joe!

  4. Joe Says:

    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…

Leave a Reply