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

  • Kotlin Blueprints
  • Ashish Belagali Hardik Trivedi Akshay Chordiya
  • 120字
  • 2021-07-02 21:50:12

Leveraging Null safety

NullPointerException is the most dreaded exception a developer can face when working with Java language. Sometimes it's quite difficult to trace and resolve it. Kotlin comes with a built-in Null safety system that is aimed at eliminating the null references from code:

The null references are famously known as The Billion Dollar Mistake (https://en.wikipedia.org/wiki/Tony_Hoare#Apologies_and_retractions) as their inventor later called it.

This Null safety system by Kotlin makes the whole Spring Framework API null safe (at least from the Kotlin side) and allows us to deal with null values at compile time rather than throwing NullPointerException at the runtime:

Kotlin's Null safety also means that the web apps you build with Spring Boot will be more robust.

主站蜘蛛池模板: 武川县| 金山区| 武义县| 达州市| 诸城市| 晋江市| 集贤县| 讷河市| 承德县| 新化县| 六盘水市| 公安县| 岳普湖县| 南部县| 乌兰浩特市| 隆德县| 阳原县| 兴安县| 吉木萨尔县| 平遥县| 成武县| 会理县| 乌苏市| 东山县| 南乐县| 齐河县| 长泰县| 靖西县| 勐海县| 称多县| 瑞安市| 寻乌县| 奉新县| 红安县| 南和县| 沙坪坝区| 合阳县| 电白县| 龙山县| 朝阳县| 通海县|