История изменений
Исправление
bbk123,
(текущая версия)
:
The fundamental principle for achieving null-safety in PPL is this:
PPL makes a distinction between nullable and non-nullable types.
By default all values are non-nullable. Non-nullable values cannot be null at runtime and therefore
can't lead to a null pointer error.
Values that are allowed to be null at runtime must explicitly be declared as nullable in the source
code. The compiler requires that nullable values must be checked for null before an operation can be
executed on them. Thus null pointer errors can't occur at runtime.
There are specific instructions and operators to support writing compact and readable null-safe
code.
Тоже самое или очень похожее, но с другим синтаксисом, есть и в Kotlin
https://kotlinlang.org/docs/reference/null-safety.html
Исходная версия
bbk123,
:
The fundamental principle for achieving null-safety in PPL is this:
PPL makes a distinction between nullable and non-nullable types.
By default all values are non-nullable. Non-nullable values cannot be null at runtime and therefore can't lead to a null pointer error.
Values that are allowed to be null at runtime must explicitly be declared as nullable in the source code. The compiler requires that nullable values must be checked for null before an operation can be executed on them. Thus null pointer errors can't occur at runtime.
There are specific instructions and operators to support writing compact and readable null-safe code.
Тоже самое или очень похожее, но с другим синтаксисом, есть и в Kotlin
https://kotlinlang.org/docs/reference/null-safety.html