Re:Functional Programming Doesn’t Work (and what to do about...
by ams6110 on Tuesday December 29, 2009 @03:33PM
(#1021243)
Well could you not write new A and B functions that invoke the original functions with state parameters added while also providing the state-handling mechanisms. Then all other existing calls remain unchanged. This really just introduces a namespace for what would otherwise be a "global" but it keeps the real "global" namespace unpolluted.
Of course this doesn't mean that a program will be easier to read after going the easier to write way too many times...