The Free LunchIs OverThe Free Lunch?The Free Performance Lunch!싱글코어CPU 의 발전한계.멀티코어 CPUConcurrency is the next major revolution in how we write software. -Herb Sutter
단일 할당 변수1>X.1: variable ‘X' is unbound2> X = 50.503> X = 23.** exception error: no match of right hand side value 23변수가 아니라 write-once 변수즉 한번만 bound 를 할 수 있음
17.
패턴매칭X = 50.=은 할당연산자가 아니라 패턴매칭연산자.오른쪽을 평가해서 그 결과를 왼쪽에 있는 패턴과 매치하라는 뜻.
18.
왜 단일 할당이프로그램을 더 낫게 만드는가?변수의 값을 바꿀수 있다?누가 언제 바꿨는지 깔끔하게 알기힘듬. 복잡한 잠금 매커니즘 필요.변수의 값을 바꿀수 없다?불변상태의 메모리는 read 만 가능.잠금 매커니즘이필요없다.즉 쉬운 병행 프로그래밍 가능어떻게? 프로세스 메시지 전달 방식으로.
19.
Pure message passinglanguage순수 메시지 전달 언어명령어 3개로병행프로그래밍 가능spawn : 프로세스 생성! (send) : 메시지 보내기receive : 메시지 받기
(server@host)1> fault:start().…5초후…system down!!=ERROR REPORT==== 7-Jan-2009::23:56:29 ===Error in process <0.67.0> on node 'server@host' with exit value: {badarith,[{fault,work,0}]}(server@host)2>
(server@host)1> fault:start().…5초후…system down!!=ERROR REPORT==== 7-Jan-2009::23:56:29 ===Error in process <0.67.0> on node 'server@host' with exit value: {badarith,[{fault,work,0}]}…5초후…system down !!=ERROR REPORT==== 7-Jan-2009::23:56:34 ===Error in process <0.68.0> on node 'server@host' with exit value: {badarith,[{fault,work,0}]}