Collateral Effects

This is the same as SideEffect.

You call a method that supposedly shouldn't change the state of the program (ProgramState? = the state of all objects in a program) and the bloody method does some unexpected change in ProgramState?.

The result is a program with HeisenBugs.

Is the point of the above to say that all programming should be pure functional, due to the known deleterious effects of every kind of side effect, including I/O and especially assignment?

No. Pure functional does not exist. Even Lisp and Haskell programmers use contexts.

Or is it just a rant about people doing unexpected mutators in addition to the ones you expected?

Mutators are supposed to change the receiver. SideEffects usually occur in an unrelated place.


EditText of this page (last edited August 9, 2004) or FindPage with title or text search