Coursera 의 Reactive Programming In Scala 수업 중 3 번째 챕터입니다. Try, Future, Promise 이번시간엔 Try, Future, Awaitable, Async, Promise 에 대해 알아본다. 모나드가 삶을 윤택하게 하리라 Monads and Effects 프로그래밍에서 4가지 본질적 effects 는 One Many Synchronous T/Try[T] Iterable[T] Asynchronous Future[T] Observable[T] asynchoronous computation 을 살펴보기전에 synchronous 부터 살펴볼건데 간단한 어드벤쳐 게임으로 시작하자. trait Adventure … Continue reading Reactive Programming in Scala 3 – Try, Future, Promise
Reactive Programming in Scala 2 – Stateful Object
Coursera 의 Reactive Programming In Scala 수업 중 2 번째 챕터입니다. Stateful Object 지금까지 우리가 작성한 프로그램은 side-effect free 였기 때문에, time 이 중요한 요소가 아니였다. 무슨말인고 하니, 모든 프로그램은 sequence of actions 에 대해 항상 같은 결과를 주게 되어있었다. 이건 substitution model 에 반영되어 있다. Substitution Model substitution model 을 복습해 보면, 프로그램의 evaluation 은 … Continue reading Reactive Programming in Scala 2 – Stateful Object
Reactive Programming in Scala – 1
Coursera 의 Reactive Programming In Scala 수업 중 1 번째 챕터입니다. Monad, Generator What is Reactive Programming? reactive 란 뜻은 React to events (event-driven) React to load (scalable) React to failures (resilient) React to users (responsive) Event-driven event-driven 을 통해 scalable, resilient 해질 수 있고, 이 3가지를 통해 responsive 한 서비스를 만들 수 있다. 옛날에는 시스템이 … Continue reading Reactive Programming in Scala – 1
Functional Programming in Scala – 6
Coursera 의 Functional Programming In Scala 수업 중 1 번째 챕터입니다. 지난 시간에는 referential transparency (참조투명성) 과 함수형 언어에서의 귀납법인 structural induction 에 대해서 배우고, 몇 개의 예제를 증명했었다. 이번 시간에는 스칼라의 컬렉션인 Seq, Set, Map 을 알아보고 마지막 챕터에서는 여기에 higher-order function 을 더해 미친듯한 표현력을 가진 코드를 작성해 본다. one-liner 의 절정을 보여주시는 교수님 … Continue reading Functional Programming in Scala – 6
Functional Programming in Scala – 5
Coursera 의 Functional Programming In Scala 수업 중 5 번째 챕터입니다. 지난주엔 Scala 가 리스코프 치환 원칙 을 지키기 위해 어떻게 Variance(공변성) 을 문법적으로 지원하는지 알아보았다. 직접 List 컨테이너를 구현해 보면서 함수의 인자는 Covariant, 리턴타입은 Contravariant 란 것도 알게 되었고, Nil 을 만들기 위해 Nothing 을 어떻게 엮을 수 있는지도 직접 확인해 보았다. 마지막으로, 프로그래머가 가장 … Continue reading Functional Programming in Scala – 5

