News for hackers. Stuff that matters.
Re:OO Side Effect Free Programming by ntoshev on Wednesday February 11, 2009 @11:06AM (#477152)
I disagree. Obsessiveness with small methods means less opportunity to keep your transient state in local variables, meaning you are going to make it object state (use object fields), which would actually increase your side effects.

Edit: It occurred to me that there is a case when you need to move state out of the stack to global or instance variables: programming async IO. It is notoriously inconvenient for exactly this reason.

Re:OO Side Effect Free Programming by LogicHoleFlaw on Wednesday February 11, 2009 @12:09PM (#477238)
Method arguments are a decent place to keep transient data as well. Local variables and object fields are not the only options for scoping your data.
Re:OO Side Effect Free Programming by ntoshev on Wednesday February 11, 2009 @12:46PM (#477289)
You are correct, as long as you don't get too many arguments.
Re:OO Side Effect Free Programming by LogicHoleFlaw on Wednesday February 11, 2009 @01:24PM (#477352)
Then start using closures :)
Re:OO Side Effect Free Programming by darkxanthos on Wednesday February 11, 2009 @12:41PM (#477279)
Exactly.. lol. I guess some people's field of vision is about this big |<--->|