News for hackers. Stuff that matters.
Re:Dependency Injection is a Virtue by molf on Monday January 07, 2013 @05:04AM (#5020285)
Perhaps so, but the call to `update` makes this function impure even if `time` is an argument.
Re:Dependency Injection is a Virtue by praptak on Monday January 07, 2013 @06:01AM (#5020442)
I still agree with the general point about valuable insights from FP. Perhaps the one applicable here is: impure functions can still make for testable and clean code as long as they are explicitly so.
Re:Dependency Injection is a Virtue by chrismsnz on Monday January 07, 2013 @05:08AM (#5020299)
Indeed, I wasn't commenting directly on his example rather the general topic.