News for hackers. Stuff that matters.
Re:Don’t Be Scared Of Functional Programming by MidsizeBlowfish on Wednesday July 02, 2014 @01:36PM (#7978334)
Eliminating side effects is about a lot more than variable scope. One example would be reading from/writing to a file.
Re:Don’t Be Scared Of Functional Programming by dustingetz on Wednesday July 02, 2014 @01:50PM (#7978444)
I think it's an accurate description. The OS code that reads a file involves changing variables outside function scope, eg pointer writes to memory mapped hardware. Simply forcing all variables to be final, all the way down, really does eliminate all side effects.