Egloos | Log-in


Is state the root of all evil?


Functional programming languages dispense altogether with changing state. None of these has ever become popular. I think state is a valuable metaphor for us since our brains are structured and conditioned to deal with changing state. Single assignment or variableless programming forces us to discard too many effective thinking strategies to be an attractive choice.

Object language are a coping strategy for dealing with state. They offer the opportunity to avoid the problem of state changing "behind your back" by partitioning the state in the system into discrete little chunks, each of witch has strictly limited access to the others. It is easier to keep track of a handful of bytes than mega- or gigabytes. The problem of incorrectly assuming the value of some state remains, but with objects you have the chance to quickly and accurately review all access to a variable.


'Implementation Patterns'를 읽으면 컨트벡은 진솔한 사람인 것 같다.

객체지향 언어는 문제 많은 상태를 다루는 하나의 전략이다. 함수형 언어는 상태를 제거해서 상태로 인해 생기는 문제 자체를 없애려고 하지만 상태를 다룰 수 없어서 또 다른 어려움을 만든다. 함수형 언어를 쓰더라도 현실 세계를 모델링 하는 한 상태 개념 자체를 다루지 않을 수는 없다. 오용하지 못하게 사용을 어렵게 해놓았을 뿐이다.

함수형 언어가 이 책에 나오는 프로그래밍 원칙 중 지역 귀결(Local consequence)을 극단적으로 추구하는 형태라면 그 반대편에는 폰 노이만 아키텍쳐와 이 아키텍쳐를 그대로 반영한 어셈블리 언어가 놓이게 될 것 같다.

막대의 중심을 잡기 위해서는 그 양 끝을 아는 것이 도움이 된다.

이 글과 관련있는 글을 자동검색한 결과입니다 [?]

by 이피 | 2007/12/17 00:19 | 트랙백 | 덧글(4)

트랙백 주소 : http://colus.egloos.com/tb/4012985
☞ 내 이글루에 이 글과 관련된 글 쓰기 (트랙백 보내기) [도움말]
Commented by jania902 at 2007/12/17 01:36
좋은 인용(+주해)들 매번 잘 읽고 있습니다.
Commented by 이피 at 2007/12/17 11:24
저도 메신져 대화명 덕분에 즐겁습니다. 특히 얼마 전의 "개발자가 상팔자"가 최고~
Commented by ologist at 2007/12/17 18:06
제거하는 것은 가장 쉽고, 좋은 선택이 맞습니다.
하지만, 제거할수 없는 것들은 관리를 해줘야 합니다.

켄트벡이 좋은 이야기를 해줬네요...^^
Commented by 애자일컨설팅 at 2007/12/18 11:10
I think concurrency is a valuable metaphor for us since our brains are structured and conditioned to deal with concurrenct world. Serial programming forces us to discard too many effective thinking strategies to be an attractive choice.

:         :

:

비공개 덧글

◀ 이전 페이지          다음 페이지 ▶