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 编程实践
点在于在任何给定的示例中可以发挥这门语言的所有潜力,但缺点在于对这些特性的基
础部分介绍有限。本书每一章都包含了该章相关基础技术的简介,所以如果你只是模
糊地知道如何创建集合、使用数组,或设计类,那么已经相当不错了。在线参考手册
https://kotlinlang.org/docs/reference
)对 Kotlin 进行了详尽的介绍,所以本书经常引用
其中的示例与讨论。
此外本书还经常介绍 Kotlin 库函数的实现。这是为了展示这门语言的开发者如何在实践
中使用它们,并讨论这些函数的设计方式。如果你很着急,无须预先了解实现,可以跳
过这些细节。
本书主要内容
本书分为 13 章,每一章都是独立的,但本书引用了许多其他资料。你可以按任意喜欢
的顺序阅读本书。
1 章讲解了安装并运行 Kotlin 的基本过程,包括使用 REPL,使用诸如 Maven
Gradle 等构建工具,以及在 Graal 中使用原生镜像生成器。
2 章讲解了 Kotlin 的基本特性
例如可空类型、操作符重载以及类型转换,
然后介绍了一些更深奥的问题,包括按位移位操作符或者在 Pair类上编写扩展函
数等。
3 章重点介绍了 Kotlin 的面向对象特性,而该部分内容可能会让其他语言的开发
者对此感到惊讶或不明所以。它包含如何使用 const 关键字、Kotlin 如何处理幕后
属性、延迟初始化以及令人恐惧的 Nothing 类,这些内容一定会令现有的 Java
发者感到困惑。
4 章只有很少的一部分内容,其中涵盖一些需要被解释说明的函数式特性。函数 ...
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