Skip to Content
Kotlin 编程实践
book

Kotlin 编程实践

by Ken Kousen
July 2020
Intermediate to advanced
235 pages
3h 37m
Chinese
China Machine Press
Content preview from Kotlin 编程实践
译者序
尽管 Google 2017 年的 I/O 大会上就宣布 Kotlin Android 开发的首选语言,但在
2019 年的 I/O 大会被再次提及之前,Kotlin 在国内的推行都并不顺利,常常有人问为什
么一定要用 Kotlin,为什么要学习 Kotlin。我也常常能听到一些老生常谈的回答:空
安全,代码简洁,新增了函数式的语法,等等。但是今天我想从另一个角度来谈谈这个
问题。
如果你和几年前的我一样,是一个“保守”的 Android 开发者,那你对技术的理解可能
会被局限在这个单一的技术栈中。例如,你也许认为编程范式只有面向过程和面向对象
两种,而面向对象是最好的编程范式;你对异步并发模型的理解也可能仅限于 Java 上的
线程抢占式调度,而对其他调度方式未有所闻;你也许对 JVM 相关的各种原理非常熟
悉,但对一些直接编译为操作系统二进制码的语言不甚了解,甚至有所抗拒。
Kotlin 是一个引子,在 Kotlin 中你将学到初等的函数式编程,可能会因此了解
HaskellLisp 等正宗的函数式编程语言,而这是一个近乎与命令式编程相对的平行世
界;在学习 Kotlin 协程的过程中,你会发现除了抢占式调度,还有协同式调度,这是一
种更安全的实现异步与并发的方式;当学习到一定阶段后,你也许会尝试 Kotlin/Native
从而了解原生二进制程序是如何工作的。当然,Kotlin Multiplatform 也许会帮助你触及
iOS 开发,而 Kotlin/JS 也许会带你走入前端的大门。
在我看来,Kotlin Java 技术栈通向更广阔的编程世界的万向门,在你通向这些曾经所
不了解的技术领域的初期,你不必精通多种语言,只需要使用 Kotlin 足矣。当然了,本
书并不包含范围如此之广的内容,它将带你迈出走进 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

GraphQL 学习指南

GraphQL 学习指南

Eve Porcello, Alex Banks
Java 技术手册(原书第7版)

Java 技术手册(原书第7版)

Benjamin J. Evans, David Flanagan
Python机器学习基础教程

Python机器学习基础教程

Andreas C. Müller, Sarah Guido

Publisher Resources

ISBN: 9787111659624