►
From YouTube: .NET Design Review: Nullable Annotations
Description
We're trying to finish reviewing the nullable annotations for System.Runtime.
D
E
Whether
something
as
string
question
mark
doesn't
mean
you're,
explicitly
calling
it
on
null
right.
We
want
to
allow
a
string
question
mark,
regardless
of
whether
you're
using
a
null
constant
right,
because
you
want
to
allow
things
that
are
typed
as
string
question
mark
to
still
be
called
with
us
without
having
to
bang
it.
H
C
E
B
C
B
To
me,
it
just
seems
confusing
that
for
any
other
instance,
member
that
I
would
access.
If
I
had
a
string
question
mark
I
would
have
to
bang
it
first
to
say
this
is
definitely
not
at
all
at
this
point,
but
for
these
extension
methods
in
particular
because
of
how
they
behave,
we're
saying
that
that
this
can
be
an
all
without
a
bang
and
I.
Think
that's
fine!
B
C
J
C
L
E
L
N
D
I
F
C
P
I
I
I
C
D
G
M
C
H
E
R
E
B
N
C
N
B
So
it's
a
public
method,
damn
it
yeah,
but
in
our
in
either
case
the
the
overloads
that
both
go
to
yeah.
I
D
D
E
E
B
E
E
B
B
D
C
I
Right
can
it
any
of
the
compiler
kind
of
like
what
it
sees?
The
struct
is
not
movable
very
musically
soluble
and
then
the
object
is
movable.
But
basically,
if
you
don't
put
an
other
question
mark,
the
compiler
might
have
my
opinion
like
the
compiler.
Should
my
assume
is
none
more
whatever
case
there
is,
and
if
you
put
the
question
mark,
if
the
stock
is
not
available
or
is
unknowable
because
it
cannot
be
possibly
and
in
other
any
other
cases.
D
C
D
B
B
D
E
D
D
E
C
X
C
C
D
E
We're
saying
different
things:
if,
for
any
type
in
net,
any
reference
type
in
dotnet
that
implements
ie,
comparable
or
I
equate
able
it's
going
to
be
implementing
it
as
T,
not
as
T
question
mark
and
therefore
anything
that
is
constrained
to
T,
where
T,
where
to
T,
where
T
is
I
comparable
of
T
or
I.
Equatable
of
t
could
only
be
the
non
nullable
version,
because.
P
C
Yeah,
let's,
let's
separate
that
because
there's
two
kinds
of
interfaces
here
right,
there's
the
referential
ones
like
t
:,
I
credible
t
where
basically
t
it
occurs
on
both
sides
and
then
there's
the
one
where
t
only
occurs
on
the
left-hand
side
right,
equal
and
I
comparable
right
the
non
generic
word.
So
if
there
is
no,
if
t
only
appears
on
the
left-hand
side,
then
the
interface
constraints
tells
you
nothing.
C
And
so
the
fact
that
the
T
occurs
on
the
right
hand,
side
means.
We
know
that
aesthetically
speaking,
nothing
implements
I
equatable
of
something
malleable
and
in
practice
nothing
implements
are
comparable
of
malleable
T.
So
that
means
practically
speaking.
You
can't
substitute
anything,
but
that's
more
like
a
frame
or
design
guideline
order.
The
type
system
think
you
can
rely
on.
E
C
C
All
I'm
saying
is
that
like
like,
if
the
t
doesn't
occur
in
the
right
hand,
side,
and
you
really
don't
want
it
nullable,
you
would
have
to
add
non
audible
as
a
constraint
right.
You
can
decide
that
we
don't
do
this.
Why
equatable
and
I
comparable,
because
we
know
that
nothing
will
implement
those,
but
might
as
well
just
add
them
there
for
consistency
right
it
doesn't
it
doesn't
hurt
you
really
want
it
to
be
non
audible
but
I'd
be
fine.
C
C
B
I
would
have
expected
us
to
yeah.
It
looks
like
if
you
constrain
I
comparable
of
T
to
BI
comparable
of
T
question
mark.
Then
it
depends
on
how
you
define
T
comparable
in
your
generic
instantiation.
So
if
you
say
ti
comparable
of
T
question
mark,
then
it
allows
null.
But
if
you
do
TI
comparable
of
T
no
question
market,
it
warns
on
null
if
you
can
strain
the
tea
comparable
to
BI
comparable
of
tea
question.
C
B
E
D
C
AA
E
C
B
D
H
C
O
C
E
C
D
J
X
C
C
I
W
I
I
E
L
C
A
B
J
B
C
Let's
take
this
offline
and
design
like
basically,
somebody
has
to
walk
through
it
and
say
what
would
the
like?
What
would
the
syntax
have
to
be?
Well,
the
semantics
have
to
be
on
this
method
so
that
you
can
have
null
elements
and
still
pass
in
sensible
pages
for
basically,
both
nullable,
inaudible
and
sensations
of
the
same
type
I
will.
C
N
AB
Y
Z
B
D
D
E
AA
AA
C
C
F
C
Z
R
B
C
D
D
Z
Z
Z
Q
Q
J
J
C
S
C
It
is
true
that
at
one
time
never
inaudible
of
T
is
not
an
arbitrary
type.
It's
very
specialized
mother
on
time,
because
if
you,
but
if
you
try
to
box
it,
it
will
box
in
Marbury
it's
not,
it
will
not
box
the
action,
not
ability
so
technically
speaking,
it's
long,
so
it
might
actually
not
even
by
the
night.
U
N
Z
C
Z
X
X
B
E
E
B
We
have
no
way
to
format
the
string
with
the
full
underlying
value.
We
only
can
format
up
to
99
digits,
but
you
can
guarantee
round-tripping
at
17
digits,
but
there's
very
there's
a
lot
of
cases
where
getting
the
full
underlying
value
is
important,
such
as
we're
validating
the
math
is
being
done
correctly
with
complex
algorithms
subspaces.
Could
you
just.
D
AB
AB
S
S
B
Z
X
E
I
guess
I'm
not
I'm,
not
understanding.
If
I
have
a
I
have
a
memory
manager
of
string
question
mark,
then
I
would
be
operating
you're
saying
I
have
a
read-only
memory
of
tea,
but
a
memory
manager
of
tea
question
mark.
D
E
Right,
but
that
would
be
weird
because
the
memory
is
tied
to
the
memory
manager.
So
that
would
mean
that
you
somehow
got
a
read-only
memory
of
T
question
mark
out
of
the
memory
manager
and
then
somehow
converted
it
into
a
non
nullable
T
and
then
tried
to
get
the
nullable
never
manager.
Out
of
it.
Couldn't.
D
Z
E
C
C
Q
Q
U
D
Z
Z
C
Z
Z
The
exceptions
I
assume
we're
just
doing
the
representation
that
you
could
have
passed
them
called
any
of
the
constructors.
So
all
the
properties
can
be
default,
hidden,
Jenny.
What
we
did
for
exceptions,
pretty
much
everything
in
the
repast
exceptions.
No
it'll
be
really
sad
throughout
New
Avengers
mutex
exception
through
an
argument,
no
exception.
Z
U
B
B
Z
AD
X
X
X
X
Z
Z
X
C
X
E
Z
E
E
Z
Z
C
U
K
E
J
E
Be
it
the
opposite?
Generally,
the
field
is
nullable,
so
the
first
argument
ends
up
being
a
ref
to
a
nullable
field,
and
the
second
argument
ends
up
being
an
unknown
value
like
its
new
object
or
something
ends
up
being
the
second
argument,
and
so
the
compiler
ends
up
seeing
a
tee
question
mark
and
a
tee
edit.
E
D
Z
X
Should
never
be
a
warning
right,
always
I.
C
E
I
Z
C
C
E
I
think
the
issue
is
actually
it
was
was
related.
It
was
that
there
was
an
issue
with
the
compiler
implicitly
treating
allowing
you
to
pass
us
like
a
string
question
mark
to
something
that
took
arrest,
allowing
you
to
pass
by
ref
a
string
question
mark
to
something
that
took
a
ref
string,
which
it
should
be
allowable,
but
for
a
while
it
wasn't
and.
J
H
Z
Prepare
exchange
will
only
swap
in
value
if
location,
one
was
comprehend
so
comprehend
and
valuable.
No,
you
don't
know
what
quotation
one
more
time.
I
guess
you
knew
what
item
one
of
them
is
one
of
those
two
here.
It's
definitely
not
not.
So
yes,
if
one
of
those
guaranteed
not
know
when
the
without
price
guaranteed
by
man,
oh.
D
AA
E
Two
scenarios
that
you
often
use
compare
exchange
for
and
it's
and
no
ends
up
being
super
common
in
one
case
and
not
particularly
common
in
the
other.
So
for
lazy
initialization
you
pretty
much
always
have
no,
you
know
for
reference
sites,
you
pretty
much
always
have
known
as
the
comprehend,
but
the
other
thing
use
compare
exchange
for
is
like
updating
a
value
in
a
thread
safe
way,
substituting
it
in.
So
you
read
the
current
value.
You.
E
In
some
way,
and
then
you
pass
in
the
previously
read
value
as
the
comprehend
and
if
you
fail
you
try
again,
like
you
know,
if
you
were
building
a
concurrent
stack
or
something
like
that,
where
you
need
to
allocate
a
new
node
and
swap
it
in
for
the
next
pointer
and
so
in
those
situations.
Comp
range
is
often
not
know.
Yeah.
C
E
In
this
overload,
it
basically
allows
you
this
overload,
does
double-checked
locking
and
it
will
handle
initializing
the
lock
for
you
Adam,
but
now
so
there.
If
there
isn't,
there
should
be
an
attribute
on
the
ref
objects
thing
o'clock.
That
is
not
know.
So,
basically,
when
this
method
returns
sink
lock
will
not
be
known
right.
E
E
V
D
E
E
E
B
C
Should
write
this
down,
but
the
thing
is
we
need
to
part
we
need
to
make
a
paucity
actually
what
the
attributes
were
are
not
complete.
Last
time
in,
like
I,
think
there
was
one
in
the
middle
that
we
view
the
veteran
units,
but
the
most
part
of
it.
They
haven't
really
look
at
the
attributes.
Okay,
so
that's
why
I
haven't
pay
attention
to
attributes.
P
U
C
B
Q
D
C
C
E
N
B
AC
Well,
we're
giving
us
a
key
to
the
floor.
What
do
you
find
more
convenient
in
your
theater
good?
It
seems
like
a
bit
of
him
not
considered.
F
E
B
F
P
P
M
C
N
P
C
E
The
only
interesting
thing
with
thread-local
is
we're
not
reviewing
attributes,
but
there's
going
to
be
maybe
null
attribute
on
value.
You.
E
P
E
E
Means,
let's
say
you
have
you
create
a
thread
and
you
set
a
value
into
the
thread:
local
on
that
thread
like
some
disposable
object
or
something
or
some
critical
resource,
and
in
that
thread
ends
and
goes
away.
Do
you
want
the
thread?
Local
dot,
values,
property,
one
that
returns
a
list
of
T
two
to
include
the
locals
from
that
dead,
threader.