Language: Improved support for null safety

Created on 31 Oct 2018  路  3Comments  路  Source: dart-lang/language

A common source of programming faults are programs that unintentionally try to use values that are null. This issue requests Dart support for differentiating between nullable and non-nullable data types, paired with static validation.

Given vast amount of code already exists, it additionally requests a mechanism by which Dart packages and apps can gradually migrate to to utilize this.

UPDATE: this is being worked on as part of https://github.com/dart-lang/language/issues/110

request

Most helpful comment

I would strongly recommend that we also add a requirement that null safety is designed with unboxing in mind. Even though by itself it does not result in unboxing, it is a _necessary_ first step for any future language evolution towards higher performance.

All 3 comments

I would strongly recommend that we also add a requirement that null safety is designed with unboxing in mind. Even though by itself it does not result in unboxing, it is a _necessary_ first step for any future language evolution towards higher performance.

Maybe for this we can look at Swift's extreme success with optional types?

Closing this request issue as this is being worked on and tracked as feature https://github.com/dart-lang/language/issues/110

Was this page helpful?
0 / 5 - 0 ratings

Related issues

dev-aentgs picture dev-aentgs  路  3Comments

architkithania picture architkithania  路  5Comments

eernstg picture eernstg  路  5Comments

natebosch picture natebosch  路  4Comments

panthe picture panthe  路  4Comments