- Functional Kotlin
- Mario Arias Rivu Chakraborty
- 125字
- 2021-06-24 19:15:27
Immutability - It's Important
So, we are in the third chapter of, Functional Kotlin. In this chapter, we are going to discuss immutability. Immutability is probably the most important aspect of functional programming; actually, not only in functional programming, but OOP also gives some room to nurture immutability with immutable objects. So, why is it so important? What does it mean? How can we implement immutability in Kotlin? Let's answer these questions in this chapter.
The following are the points we are going to cover in this chapter:
- What is immutability?
- The advantages of immutability
- How to implement immutability in Kotlin?
- Immutability in variables
- val versus var
- val and const val—are they truly immutable?
- Compiler optimization
- Immutable collections
- The disadvantages of immutability
推薦閱讀
- Web程序設計及應用
- CMDB分步構建指南
- 深入淺出Java虛擬機:JVM原理與實戰
- Cocos2d-x游戲開發:手把手教你Lua語言的編程方法
- Android 9 Development Cookbook(Third Edition)
- 編寫高質量代碼:改善Python程序的91個建議
- Java程序員面試算法寶典
- 機械工程師Python編程:入門、實戰與進階
- Learning Neo4j 3.x(Second Edition)
- Banana Pi Cookbook
- HTML5+CSS3+JavaScript Web開發案例教程(在線實訓版)
- Python數據分析從0到1
- Creating Stunning Dashboards with QlikView
- Advanced UFT 12 for Test Engineers Cookbook
- Java Web應用開發給力起飛