1

Is the point of null safety to prevent the accidental assignment of null to a variable and then later doing something like nullable_variable.foo() which would cause a runtime error?

1 Answer 1

2

Yes:

With null safety, your runtime null-dereference errors turn into edit-time analysis errors.

It means that a lingering problem that would otherwise become known only when its already too late will turn into an error that you get while you are developing, so you will know about it and can fix it before it ever reaches a customer.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.