--
You received this message because you are subscribed to the Google Groups "Dart Core Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to core-dev+unsubscribe@dartlang.org.
To unsubscribe from this group and stop receiving emails from it, send an email to core-dev+u...@dartlang.org.
lexically scoped, non-inherited library, part and class level annotations [such as]:@nullable_by_default
[or]@non_null_by_default
.
The Null type has been moved to the bottom of the type hierarchy. As such, it is considered a subtype of every other type.
The Null type has been moved to the bottom of the type hierarchy. As such, it is considered a subtype of every other type.Such a decision seems to be counter to supporting NNBD. How do you think it will impact work on the analyzer?
--
You received this message because you are subscribed to the Google Groups "Dart Core Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to core-dev+unsubscribe@dartlang.org.
Bob, would it be useful for community members to help you non-nullify the core libraries?
Is there a repo where they can contribute to that effort?
Hi Bob et all,
Great news, that this is taking flight! Let me know if you think that it might be helpful to make updates to DEP30, as the report was quite extensive in exploring alternatives.
Having migrated other languages to NNBD before, I'd very strongly recommend doing so only with explicit support for G.2 Migration aids such as:lexically scoped, non-inherited library, part and class level annotations [such as]:@nullable_by_default
[or]@non_null_by_default
.If tools have only a single all-or-nothing top-level NNBD switch, that will result in an explosion of warnings that will make it difficult to work on adding nullity annotations to any project (including the core libraries).
Also, I noticed the following in the SDK Changlog for 1.22.0:The Null type has been moved to the bottom of the type hierarchy. As such, it is considered a subtype of every other type.Such a decision seems to be counter to supporting NNBD. How do you think it will impact work on the analyzer?
const empty = const <dynamic>[]; // i.e. == const [];
I'm curious why the Flutter team couldn't have used:
const empty = const <dynamic>[]; // i.e. == const [];instead of const <Null>[] (though I imagine that it maybe have been outside of the Flutter team's control).
Then they wanted to be able to do:class PopupMenuEntry<T> {T get value => null;...};class PopupMenuDivider implements PopupMenuEntry<???> {...}
<PopupMenuEntry<LeaveBehindDemoAction>>[...new PopupMenuDivider(),...]
... I wrote up a proposal here: https://github.com/dart-lang/sdk/pull/28619
That was mostly an intellectual exercise for me. I learn a lot by writing about something so hashing out that proposal forced me to think through a bunch of cases. It's also a little easier for me to evolve since it lives in the SDK repo and is just a plain Markdown file.
For the prototype, I wasn't planning to add in support for disabling them on a per library/file/class basis. Instead, I figured I would just use diffs on that generated file in order to not get overwhelmed by the sea of errors.
...
For the real implementation, yes, this is definitely something I see us wanting to tool. I made a note of it on the tracking bug so we don't forget.
This is one of the questions I'm hoping the prototype will help us answer confidently. Right now, I'm making as few changes as possible, so I am keeping Object as the root of the hierarchy because that's how it is today. See "Object is always nullable" here. This means there is no way to express "Any Object but not null."
... Real usability data > opinions and guesswork.
Let me know if there's anything else I can do to coordinate better with you. I'm trying to move quickly and get hacking on stuff, but I don't want to step on any toes or waste time rediscovering something you already know.
On Friday, February 3, 2017 at 9:36:18 AM UTC-8, rnystrom wrote:... I wrote up a proposal here: https://github.com/dart-lang/sdk/pull/28619That was mostly an intellectual exercise for me. I learn a lot by writing about something so hashing out that proposal forced me to think through a bunch of cases. It's also a little easier for me to evolve since it lives in the SDK repo and is just a plain Markdown file.I agree that it makes sense to keep such a planning/todo-list-like document as separate file that is more easily modifiable.For the prototype, I wasn't planning to add in support for disabling them on a per library/file/class basis. Instead, I figured I would just use diffs on that generated file in order to not get overwhelmed by the sea of errors.Sure, keeping things as simple as possible for the prototype makes sense....For the real implementation, yes, this is definitely something I see us wanting to tool. I made a note of it on the tracking bug so we don't forget.Good.This is one of the questions I'm hoping the prototype will help us answer confidently. Right now, I'm making as few changes as possible, so I am keeping Object as the root of the hierarchy because that's how it is today. See "Object is always nullable" here. This means there is no way to express "Any Object but not null."In the prototype that I had developed (in which I was also trying to make as few changes as possible), I let `Object` be the root of the non-nullable type hierarchy, and used `Object?` to represent a possibly null object. This is achieved by making Null a root (B.4.7) --- and hence the type hierarchy becomes a "forest", rather than a single tree ... or, if we insist on having a single tree, we can elect the (denotation of the type expression) `Object?` as the new root.... Real usability data > opinions and guesswork.+1Let me know if there's anything else I can do to coordinate better with you. I'm trying to move quickly and get hacking on stuff, but I don't want to step on any toes or waste time rediscovering something you already know.I'm open to suggestions. I think that it would be great to keep the DEP-30 document up-to-date so as to reflect our latest ideas / decisions (following experimentation) concerning how NNBD can best be realized in Dart.
I can grant you access to the repo if you'd like to be able to modify the DEP yourself. If Dan agrees, I'd be glad to contribute to updating the DEP myself.
That being said, I don't want to slow you down.Let me know what you prefer, or even if you'd like for us to hold a short coordinating meeting.