Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Proposal for non-nullable types #28619
This is the living proposal and tracking bug for adding non-nullable types (#22) to Dart. Two important caveats to keep in mind:
In order to assess the usability, we're going to do a prototype first to see how it feels to convert a decent chunk of code (include our core libraries) to use non-nullable types.
The prototype lives on this branch: https://github.com/dart-lang/sdk/tree/prototype-nnbd
Implement static checking rules for non-nullable types
Implement analysis rules to work with nullable types
Convert core libraries to be null-safe
Determine which extensions to the proposal we want to try
Convert some framework and library code to be null-safe
Convert an application or two to be null-safe
TODO: Which applications?
Once we get far enough through this, we should be able to confidently decide if
This is a big feature with a lot of moving parts. I don't have a detailed plan
TODO: Fill in more here.
Can we put this document someplace other than on an unmerged branch? Unless we have some sort of system for tracking which branches have important information, but shouldn't be merged, then we don't know which branches besides master, dev, and stable are important.
Sorry, no real update. We've been very focused on getting everything onto strong mode and getting Dart 2 shipped. That's a big migration with a lot of breakage, so it's consumed most of our time and most over our user's capacity to absorb breakage.
There is still a lot of hope we can get to non-nullable types before too long, but we'll need to rest a bit and give our customers a little breathing room after the migration we've dragged most of them through. For obvious reasons, adding non-nullable types will cause a lot of breakage and migration cost, so we want to be sensitive to user pain tolerance. :)