본문 바로가기
[도서 정리] Android Development with Kotlin - Playing with Functions Android Development with Kotlin - Playing with Functions 이 정리글은 Kotlin in Action 책을 보고 실무에 Kotlin 을 사용하던 사람이 몰랐던 내용이나 remind 하고 싶은 내용을 위주로 정리한 글입니다.제대로 내용을 파악하시려면 책을 구매해서 읽어보세욤~ -Function 과 Method 를 구분하는 논리..Function 은 이름을 가진 Code 조각.Method 는 class 와 연관되어진 function. member function 을 method 라 부른다. 논란의 여지는 있는데 Java 에는 Method 만 있다는 의견이 많다.일각에서는 static function 은 function 이라고 이야기하기도 한다. Kotlin 에서의 .. 2018. 12. 12.
[Kotlin] 장점, 단점, 그리고 아쉬운 점 이야기 [Kotlin] 장점, 단점, 그리고 아쉬운 점 이야기 https://medium.com/keepsafe-engineering/lessons-from-converting-an-app-to-100-kotlin-68984a05dcb6https://medium.com/keepsafe-engineering/kotlin-the-good-the-bad-and-the-ugly-bf5f09b87e6f -위 링크의 글을 쓴 필자는 마켓에 출시된 Java 로 되어 있는 앱을 Kotlin 으로 전환했다.많은 사람들이 Kotlin lib 때문에 dex method limit 이 걸릴 것을 걱정하지만,실제 converting 후 proguard 적용시 method count 는 10% 줄어들고, code line 은 30% 줄.. 2018. 1. 15.
[Kotlin Tutorial] DSL construction - Chap 11. [Kotlin Tutorial] DSL construction - Chap 11. 참조 : Kotlin in action 11.1. From APIs to DSLs -DSL 을 작성하기 전에 생각해봐야 할 것이 있다. 우리의 (Kotlin?) 궁극적 목표는 가독성과 유지보수성을 최대로 늘리는 것.그것은 곧 좋은 API 를 설계하는 것으로 이어진다. 그렇다면 API 가 clean 하다는 것은 무슨 의미일까?1. 사용자가 읽기 좋은 것. 그것은 name 과 concept 을 잘 잡는 것이다.2. 의미없는 syntax 는 빼고, 최소한의 코드로 code 가 읽기 좋은 것. -Kotlin 에서는 clean API 를 위해서 extension function, infix calls, lambda syntax sh.. 2017. 9. 14.
[Kotlin Tutorial] Kotlin 의 Type system #2 [Kotlin Tutorial] Kotlin 의 Type system #2 참조 : Kotlin in action 6.2. Primitive and other basic types 6.2.1. Primitive types: Int, Boolean, and more -Kotlin 은 primitive type 과 wrapper type 을 구분하지 않는다. -그렇다면 Int 가 object 라면 Kotlin 은 모든 primitive type 을 실제로 object 로 만드는가?당연히 그렇게 안 했다.compiler 가 대부분의 Int type 을 Java 의 primitive type 으로 변형시킨다.generic, collection 등은 원래 Java 의 Integer 형태만 담을 수 있으므로 이 경.. 2017. 8. 22.
반응형