Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Specify null safety #2605

Open
wants to merge 85 commits into
base: main
Choose a base branch
from
Open

Specify null safety #2605

wants to merge 85 commits into from

Conversation

eernstg
Copy link
Member

@eernstg eernstg commented Nov 2, 2022

This is the full PR that integrates the null-safety feature into the language specification. It is not intended to be landed as such: Parts of it are currently being reviewed, and further parts will be reviewed later on, such that all of this gets landed, but avoiding a review which is too large to get done in one fell swoop.

Parts under review (as of Nov 2 2022): #2052, #2023.

This PR has been uploaded at this point in order to make it more convenient to refer to specific locations in the proposed new text. When each of the parts lands it is expected that this PR is rebased, and piece by piece of it will disappear because some of the changes in this PR have already been made by those partial PRs.

@github-actions
Copy link

github-actions bot commented Nov 2, 2022

Visit the preview URL for this PR (updated for commit 37acce6):

https://dart-specification--pr2605-specify-null-safety-50hej3os.web.app

(expires Mon, 18 Sep 2023 13:58:21 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign: 6941ecd630c4f067ff3d02708a45ae0f0a42b88a

@eernstg eernstg force-pushed the specify_null_safety_sep21 branch from 7e6cd3d to 0ccb1e8 Compare May 31, 2023 09:58
@eernstg eernstg force-pushed the specify_null_safety_sep21 branch from 57134d6 to a07718a Compare July 6, 2023 12:08
@eernstg
Copy link
Member Author

eernstg commented Jul 19, 2023

Woohoo! Part of this PR has now been landed: #2052.

eernstg referenced this pull request Jul 21, 2023
…tions' (#2052)

Integrate the null-safety aware sections about variables and local variable declarations in the the language specification.

Also updates the terminology to talk about 'static X' meaning a member declaration that includes the keyword `static` (or a member whose declaration includes `static`). This means that we avoid having the extremely confusing phrase 'static variable' (meaning a top-level variable or a variable whose declaration includes `static`). The new meaning of 'static variable' is simply a variable whose declaration includes `static`. Eliminated the single occurrence of 'static function' (now using 'static member', which is well defined).

Similarly, updates the terminology to avoid the words 'mutable' and 'immutable' (about variables). The reason for this is that the concept of being immutable is confusing now that we have `late final v;`: That declaration induces a setter, but it is semantically immutable (because it may be initialized, but it will never update the initial value to a different value).
@eernstg eernstg force-pushed the specify_null_safety_sep21 branch 2 times, most recently from b68a613 to 8346903 Compare October 9, 2023 16:09
…new/const C<T>()` is still an error when `C<T>` is super-bounded
…nal and named parameters, not just parameters that are both
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant