코틀린, 코틀린답게 사용하기 - 1. Expression
Java 에는 Effective Java 라는 유명한 지침서가 있습니다. 코틀린을 주로 다뤄야하는 환경으로 오면서 코틀린을 코틀린답게 사용하기위해 Kotlin계의 이펙티브자바인 Kotlin in action 을 공부하고있습니다. Kotlin in action 에서 다루는 내용들을 바탕으로 기억해야 할 것들을 정리하려고 합니다. 해당코드는 github에서 확인할 수 있습니다. 코틀린에서 문(statement) 과 식(expression) 의 구분 코틀린에서 if, when 등 루프를 제외한 대부분의 제어 구조 등은 자바와 달리 expression 입니다. 이로인한 효과에 대해서 알아보려고합니다. statement 와 expression 는 쉽게 혼동하기 쉬운 개념입니다. 코틀린에서 statement 와 e..