Side effect (computer science)
additional effect of a function in a procedural programming language besides returning a value / From Wikipedia, the free encyclopedia
A part of a program with a side effect performs a noticeable action other than giving back a value.[1] Examples include showing a picture on a computer screen, or checking what year it is. Code with side effects can be harder to understand without any context, and the order of instructions more important for code with side effects.[2]
In functional programming, programmers try to avoid side effects when they can, so it is easier to prove that a program will always do what it is supposed to. In some functional languages, like Standard ML, Scheme, or Scala, side effects are not restricted, but programmers still try to use them less.[3] In Haskell, actions with side effects must be stated explicitly—this makes it easier to tell what code does or does not have them.[4]