Search
Duplicate

Lazy Evaluation

간단소개
팔만코딩경 컨트리뷰터
ContributorNotionAccount
주제 / 분류
C
개발지식
Scrap
태그
9 more properties

Lazy Evaluation이란?

In programming language theory, lazy evaluation, or call-by-need, is an evaluation strategy which delays the evaluation of an expression until its value is needed (non-strict evaluation) and which also avoids repeated evaluations
lazy evaluation은 필요없는 계산을 하지 않고 계산의 결과 값이 실제로 쓰일 때까지 계산을 뒤로 미루는 방식이다.
주로 우리는 복합 수식을 계산하거나 오류 회피용으로 자주 사용한다.
예를들어 아래와 같은 코드를 보자.