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

  • 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.

主站蜘蛛池模板: 大城县| 湖口县| 商城县| 嵊泗县| 石柱| 桃江县| 秀山| 梨树县| 咸丰县| 蓝田县| 桦南县| 河南省| 永平县| 基隆市| 邹平县| 千阳县| 汉沽区| 屯留县| 右玉县| 怀远县| 瑞金市| 庆元县| 孟村| 城固县| 崇州市| 申扎县| 平舆县| 江西省| 石楼县| 米泉市| 雷波县| 阜宁县| 明星| 太保市| 梧州市| 鄂托克前旗| 焉耆| 大同县| 竹溪县| 乐都县| 沂南县|