Java to Kotlin: A Refactoring Guidebook

McGregor, Duncan, Pryce, Nat

買這商品的人也買了...

相關主題

商品描述

Kotlin has raised the bar for programming languages on the Java Virtual Machine with its compatibility, readability, and tool support. But adopting a new language can be daunting, especially when you're working with business-critical Java code that must meet changing requirements.

This book takes a novel approach to introducing Kotlin to Java programmers: showing you how to gradually refactor Java code to idiomatic Kotlin while continuing to evolve its functionality. But converting Java to Kotlin is just the starting point. Kotlin has many features beyond Java.

Using worked examples, authors Duncan McGregor and Nat Pryce guide you through honing the converted code to make it simpler, more efficient, more expressive, and easier to change. You'll learn how to take advantage of functional constructs to improve program structure, reliability, and error handling.

Once you finish this book, you'll be confident in writing Kotlin from scratch, converting your existing Java to Kotlin, and managing a mixed Java-Kotlin codebase as it evolves over time.

商品描述(中文翻譯)

Kotlin以其兼容性、可讀性和工具支援,提升了在Java虛擬機上的程式語言水準。但是,當你需要處理業務關鍵的Java程式碼並滿足不斷變化的需求時,採用一種新的語言可能會讓人感到困惑。

本書採用了一種新穎的方法,向Java程式設計師介紹Kotlin:展示如何逐步將Java程式碼重構為符合Kotlin慣用寫法,同時繼續發展其功能。但將Java轉換為Kotlin只是一個起點。Kotlin還有許多超越Java的功能。

作者Duncan McGregor和Nat Pryce通過實例演示,引導您逐步優化轉換後的程式碼,使其更簡潔、更高效、更具表達力並且更易於修改。您將學習如何利用函數式結構改善程式結構、可靠性和錯誤處理。

完成本書後,您將自信地能夠從頭開始撰寫Kotlin程式、將現有的Java程式轉換為Kotlin,並在程式碼庫隨著時間的推移進行混合Java-Kotlin程式碼的管理。

作者簡介

Nat and Duncan both started programming in Java before its 1.0 release, and have 55 years of combined experience on both the JVM and other platforms. Until they discovered Kotlin in 2015 Java was their language of choice for most applications.

That changed when they fell in love with JetBrains' new creation and spread the word, first with their own colleagues and clients, then the JVM community in London, and then internationally through conferences. They have both presented at KotlinConf, where they also run a one day workshop "Refactoring to Kotlin," which forms the basis for the introductory chapters of this book.

Nat and Duncan both started programming in Java before its 1.0 release, and have 55 years of combined experience on both the JVM and other platforms. Until they discovered Kotlin in 2015 Java was their language of choice for most applications.

That changed when they fell in love with JetBrains' new creation and spread the word, first with their own colleagues and clients, then the JVM community in London, and then internationally through conferences. They have both presented at KotlinConf, where they also run a one day workshop "Refactoring to Kotlin," which forms the basis for the introductory chapters of this book.

作者簡介(中文翻譯)

Nat和Duncan在Java 1.0版本發布之前就開始編程,並在JVM和其他平台上擁有55年的經驗。直到2015年他們發現Kotlin之前,Java一直是他們大多數應用程序的首選語言。

當他們愛上JetBrains的新創作並傳播這個消息時,一開始是與自己的同事和客戶分享,然後是倫敦的JVM社區,最後通過國際會議傳播。他們兩人都在KotlinConf上做過演講,並且還舉辦了一天的“重構到Kotlin”工作坊,這也是本書介紹章節的基礎。