- 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
推薦閱讀
- 數(shù)據(jù)庫程序員面試筆試真題與解析
- 基于Swift語言的iOS App 商業(yè)實(shí)戰(zhàn)教程
- Android Wear Projects
- C語言程序設(shè)計(jì)簡(jiǎn)明教程:Qt實(shí)戰(zhàn)
- 算法圖解
- NGUI for Unity
- SQL Server 2008實(shí)用教程(第3版)
- Oracle SOA Suite 12c Administrator's Guide
- 網(wǎng)絡(luò)綜合布線與組網(wǎng)實(shí)戰(zhàn)指南
- Microsoft XNA 4.0 Game Development Cookbook
- Python編程:從入門到實(shí)踐(第2版)
- Python編程零基礎(chǔ)入門
- 跟著迪哥學(xué)Python數(shù)據(jù)分析與機(jī)器學(xué)習(xí)實(shí)戰(zhàn)
- Python接口自動(dòng)化測(cè)試
- C# 4.0權(quán)威指南