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

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

主站蜘蛛池模板: 山东省| 南澳县| 和硕县| 三都| 襄垣县| 宝鸡市| 宁城县| 灌阳县| 桓仁| 胶州市| 金坛市| 抚州市| 岑巩县| 永宁县| 贡山| 仙游县| 临清市| 新丰县| 同德县| 肥东县| 平江县| 博白县| 广汉市| 罗江县| 济南市| 济宁市| 诸暨市| 沁源县| 长海县| 仪征市| 蓝田县| 祥云县| 沈丘县| 二连浩特市| 阿尔山市| 潢川县| 镶黄旗| 西丰县| 青州市| 九江县| 弋阳县|