Site-www: Documentation for abstract fields?

Created on 8 Oct 2020  路  6Comments  路  Source: dart-lang/site-www

It came up in an internal code review that abstract fields are not covered by the nnbd documentation, though they are part of the release. Is this covered somewhere else? If not, should we cover it as part of the null safety docs?

cc @kwalrath @munificent @eernstg

Most helpful comment

Yes, I pointed to that in the code review (and it's a good description!), but I think we should mention it somewhere in the language tutorials, Effective Dart, null safety documentation etc.

All 6 comments

Yes, I pointed to that in the code review (and it's a good description!), but I think we should mention it somewhere in the language tutorials, Effective Dart, null safety documentation etc.

It feels weird to me to put it in the null safety docs. Maybe just in the CHANGELOG?

It feels weird to me to put it in the null safety docs.

It's definitely very relevant to null safety, I've already used it in one migration. Any time you have an abstract class with a field and you intend the field to be non-nullable, the right migration (albeit a breaking one) is to use an abstract field.

Oh, crap, abstract fields. I spaced and read that as external fields. I forgot that we added both of them.

Yes, I think those are important enough to document in the Language Tour and other places. I like the idea of mentioning it in the null safety docs too as a recommended migration.

Closing in favor of #2695, which @munificent has agreed to work on.

Was this page helpful?
0 / 5 - 0 ratings