개요

In computer programming, a function, or method, is said to have a "side effect"

사이드이펙트 사례

In contrast, a side effect might be something like

사이드 이펙트로 분류되는 일반적인 기준

  1. 스코프(컨텍스트): 컨텍스트 바깥의 상태를 변경하는지
  2. 변경의 캡슐화 여부: 변경이 외부에서 관측 가능한지

In conclusion, whether mutating the state of an instance is classified as a side effect often depends on the scope and encapsulation of that change.