null analysis with control flow

eugene via Digitalmars-d digitalmars-d at puremagic.com
Wed Sep 21 06:23:15 PDT 2016


On Wednesday, 21 September 2016 at 13:10:53 UTC, w0rp wrote:
>
> Assignment of null to a type T is forbidden. Assignment to a 
> type T? forms a fence, which would imply an atomic fence. When 
> a type T is assigned to a variable of type T?, then after that 
> line of code, the value can be considered to be of type T. When 
> a type T? is re-assigned to a variable value, then the null 
> safety checks will be applied again, and either another 
> assignment expression or condition must be used before access 
> is made.
>

hello, i saw something like this in Ceylon and Kotlin


More information about the Digitalmars-d mailing list