官术网_书友最值得收藏!

  • 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
主站蜘蛛池模板: 三原县| 手游| 城口县| 丰镇市| 滨海县| 双城市| 富裕县| 安康市| 龙里县| 远安县| 遂川县| 卓尼县| 贵阳市| 吴堡县| 剑阁县| 清新县| 张家港市| 奈曼旗| 五华县| 安溪县| 秦皇岛市| 南开区| 万州区| 定远县| 金堂县| 达尔| 拜泉县| 苍山县| 田林县| 温宿县| 磴口县| 同江市| 汝州市| 郧西县| 梁河县| 库尔勒市| 东台市| 永春县| 松滋市| 上思县| 莫力|