►
From YouTube: .NET Design Review: UTF8 APIs
Description
00:00:00 - Approved: Complex Rune enumeration over spans of UTF-16 and UTF-8 text https://github.com/dotnet/corefx/issues/34826#issuecomment-466507394
B
It'll
be
lost,
okay,
perfect.
We
can
stall.
Oh
okay,
just
tell
me
offline
hello,
son,
oh
okay,
so
this
are
we
probably
like
yeah?
We
aren't
so.
This
API
was
previously
approved
great.
However,
when
this
was
approved,
you
see
how
some
of
the
API
is
used.
Charite,
in
addition
to
charm,
like
that
decode
first
were
in
decode
from
n
stuck
out
that
yeah
we
don't
have
Tori
yep.
So
if
you
scroll
all
the
way
to
the
very
bottom,
there
is
an
open
question
which
is
okay.
So,
let's
assume
that
we
want
to
take.
B
B
I
had
proposed
decode,
utf-8
and
decode
you
TFA
from
end,
because
the
approved
api's
wordy
code
and
decode
from
end
and
putting
utf-8
in
the
method
name
says:
I
am
going
to
interpret
this
span
of
byte
as
utf-8
in
the
future.
If
we
wanted
to
decode
a
span
of
byte
as
u
TF,
7
or
whatever
weird
reason
or
you
TF
lorg,
then
we
would
have
a
decode.
You
TF
more
method
which
would
have
any
exact
same
signature,
otherwise,.
B
C
C
C
B
Generally,
we
don't
force
UTF
encodings
in
people's
faces
when
they're
using
tor,
like
we
don't
force
people
to
realize
that
sequences
of
char
or
utf-16
it's
just
yeah,
we
should
maybe
we
should
like.
Maybe
the
category
of
user
who's
going
to
use
this
API
is,
is
cognizant
of
that
bomb
it
to
needs
more
about
the
like.
We
assume
exclusively
sixteen
right.
If
it's
a
read
only
span
of
torch
I
mean
it's
not
required
to
be,
but
if
you
fabricated,
a
read,
almost
nano
char
that
paint.
C
B
E
E
C
E
C
C
That
seems
unfortunate,
so,
like
whatever
we
do,
I
would
just
prefer
the
mere
consistent
with
the
other
ones,
and
personally
I
could
live
with
the
fact
that
we
just
call
it
decode,
and
then
we
just
have
we'd
only
spend
off-white
and
we
call
the
parameter
UT
a
text
like
because
I
mean
everything
else
seems
rather
unlikely
right.
I
mean
I,
understand
that
there's
a
it's
not
ideal,
but
it's
like
didn't.
B
So
let
me
explain
how
that
will
break
the
location
it
would.
It
would
prevent
us
from
adding
D
code
of
read
only
span
of
trade
in
the
future.
The
reason
that
would
prevent
us
is
because
the
proposal
for
utf-8
string
is
implicitly
convertible
to
both
read,
only
stand
up,
fight
and
read
almost
an
interpreter,
which
means
that
if
you
were
to
pass
a
utf-8
term
in
here,
you
get
compiler
error,
because
it's
an
ambiguous
overload
been.
D
B
D
No,
we
could
do
that
yeah
yeah.
If
you
made
it
explicit
and
then
said
that
the
language
would
support
the
implicit
conversion,
assuming
that
they
were
going
to
do
that,
then
you
could
avoid
the
overload
resolution
problem
and
we
could
then
default
to
the
utf-8
char,
which
is
probably
the
better
overload
in
the
long
term
anyway.
Yeah.
C
I'm
curious
like
what
the
language
is
doing
that
confidence,
because
you
could
have
the
lower-level
compiler
on
a
moving
older
version
of
c-sharp
using
the
later
API.
So
the
question
is
that
I
guess
if
there
is
no
implicit
conversion
and
generally
speaking
like
if
you
make
some
reason
that
is
ambiguous,
not
ambiguous,
that's
not
a
breaking
change,
but
the
questions.
Can
you
create
cases
where
both
would
compile
but
two
different
outputs?
C
D
C
C
It
is
one
of
the
reasons
why
I'm
generally
not
a
fan
of
the
proposal
from
the
language
team
to
do
all
these
problems.
Our
target
typing,
because
target
typing
by
definition,
puts
you
in
the
spot
that
it
will
never
work
for
existing
overloads,
like
the
new
tab,
will
never
be
more
specific
than
the
old
side,
and
that
is
very
unfortunate
because
in
many
cases
you
want
actually
the
new
thing
to
be
more
specific
and
then
you're,
basically
screwed,
and
you
have
to
do
something
that
what
we
do
here
is
not
what
we
want.
B
So
another
option
is:
we
could
simply
approve
these
very
particular
api's.
The
only
consumer
I
have
for
them
right
now
is
the
web
encoder
stuff,
which
could
rely
on
them
as
an
internal
implementation
detail
so
which
ones
would
you
an
improve
their
utf-8
ones?
These
are
the
ones
that
work
on
the
written
word
stratified,
yeah,.
B
C
That
was
suggested
at
the
last
will
be
you
and
Chantelle
I.
Think
yeah
I
think
the
general
problem
is
similar
to
what
we
discussed
yesterday
memory.
Can
we
talk
to
the
the
language
folks
about
async
link,
I,
understand
the
general
desire
to
say:
if
you
want
to
do
language
work,
we
should
do
it
at
the
same
time.
We
do
the
API
ever
because
you
don't
want
to
honor
yourself
in
the
mode
where
you
ship
something
and
then
you
know
no
way.
D
C
I
think
I
think
that's
one
of
the
reasons
why
I
think
we
need
to
look
at
you
th
are
they?
The
only
problem.
Is
that
I,
it's
the
same
problem
of
many
other
things.
I
have
a
hard
time
to
viewing
YouTube
HR
about
YouTube,
YouTube
eight-string.
The
thing
these
tribes
also
have
to
kind
of
like
work
together
right
and
so
same
thing.
C
There
you
kind
of
want
to
design
both
and
then
maybe
we
decide
only
two
should
want
at
the
time,
but
you
need
to
basically
have
a
design
that
says
well,
if
you
were
just
ship
it
and
if
you
were
to
do
the
language
work
all
this.
This
whole
thing
work
and
you
know
in
tandem
and
Co,
can
be
stages
about
breaking
changes
and
I.
Think
that's
that's
you
know
they
just
haven't
done
the
work,
that's
what
we
can
kind
of
say
like
it's,
but
something
we
can
do
targeted
right.
C
C
C
C
E
B
You
have
16
year
together,
yeah
again
that
would
work
and
if
I
I
know
I
know
Miguel's
not
here
and
I
can't
speak
for
him,
but
he
has
previously
made
statements
where
he
expects
that
that
people
using
API
is
along.
These
lines
do
have
some
kind
of
understanding
about
ETF
and
coatings
and
probably
would
not
be
tripped
up
by
us
having
those
suffixes
I.
D
C
Say
that
on
that
type
es
I
mean,
if
we
add
overloads
to
the
code
or
well
a
code
from
and
then
I
would
continue
doing
that,
but
I
think
it's
okay
to
say
once
you
have
a
type
it's
similar
to
how
we
do
it
with
optional
parameters,
right
that
we
haven't
gone
back
in
time
and
added
all
that
we
move
to
overload
in
favor
of
option
arguments
exactly.
But
if
it
just
said
it's
good,
like
we
just
say
on
an
existing
Tibor
being
used
overloads,
we
keep
using
overloads
and
our
new
types
we
use
optional.
C
If
we
can
rightly
just
nice,
you
just
try
to
get
a
point
where
you
exploit
the
new
things,
but
you
also
like
what
I
don't
like
about
this
current
proposal
of
not
exposing
utf-8.
It
seems
like
just
because
we
have
a
minor
an
issue
in
the
API
service.
We
just
don't
give
you
a
feature.
I
think
that
it's
kind
of
like
steering
too
far
like
if
the
only
if
the,
if
the
fix
is
dis,
just
suffix
them
all
of
the
difficult
system
prefix.
But
then
you
can
at
least
do
everything.
C
D
Would
think
that
for
consistency
across
the
entire,
like
ecosystem,
that
even
in
these
types,
it
would
be
better
just
to
name
the
parameter
name.
So
it's
clear
that
it's
utf-8
rather
than
trying
to
say
or
api's
before
we
had
UTF
HR,
we
Adam
we
have
a
prefix
or
suffix
and
then
after
we
have
it,
I
think
I
think
having
the
parameter
name
and
the
method
names
be
consistent,
consistent
with
no
suffix
sure
overall
yeah.
C
I
guess
we
all
ever
come
together
is
that
I
don't
think
we
create
like
that
doing
the
suffixes
that
don't
I,
don't
think
we
become
straining
ourselves
in
the
future
at
all.
I'm
saying
is
that
I
think
we
can?
There
may
be
cases
where
we
can
have
better
API.
So
maybe
in
some
cases
we
decide
against
that
for
consistency,
but
that's
I,
don't
think
either
way,
I
don't
think
it's
a
big
deal
so
I'm
actually
talking
on
that
real
fast.
D
B
B
C
F
F
F
G
D
D
B
The
general
idea
behind
this
is
this
is
more
complex
enumeration
over
textual
data,
so
we
previously
approved
enumerate
words
and
enumerate
rooms.
Does
silent
substitution
of
the
replacement
character
function
mark
within
a
black
diamond?
If
it
sees
invalid
data?
The
this
enumeration
explicitly
tells
you
I
found
something
invalid
and
I.
I
did
a
substitution.
B
This
is
used
primarily
if
you're
enumerating
and
you
need
to
know
that
an
error
occurred
so
that
you
can
abort
or
do
whatever
the.
If
everything
is
for
your
scenario,
this
particular
API
is
also
computed,
something
that
I'm
that
Miguel
was
pushing
for
in
terms
of
syntax,
not
necessarily
the
API
shape.
C
B
B
What
what's
in,
are
you
able
to
use
this?
So
the
scenario
for
this
is
not
necess
I,
don't
really
expect
new
code
to
be
written
on
top
of
these
ap
is
the
scenario
for
this
is
making
it
easier
to
port
existing
code
over
from
go
to
c-sharp
using
our
API
service.
If
that's
the
case,
index
in
room
should
be
probably
swapped,
yeah
I
I
would
argue
that
go
probably
could
have
been
correctly
here.
Yeah.
B
D
C
Understanding
is
that
I
mean
you
said
you
don't
expect
new
code
to
be
written
like
this,
but
I
would
think
that
things
like
the
vs
editor
or
you
know,
terminal
window
that
basically
provides
a
text.
Editor
would
do
the
exact
same
thing
right.
That's
that's
literally
what
you
want
to
do
when
you
want
to
edit
or.
B
B
Is
not
really
going
to
yeah
I.
The
reason
for
that
is
when
you
start
considering
things
like
how
characters
start
getting
composed
on
top
of
each
other,
with
names
like
accents,
for
instance,
I,
think
it's
ligatures
yeah.
This
is
not
necessarily
going
to
assist
you
when
what
Unicode
has
a
concept
on
is
what
a
lot
of
people
just
call
Bracken's,
which
are
sequences
of
characters.
That
then
displayed
look
like
a
single
thing.
B
B
C
B
C
B
C
It
mean
this
looks
very
familiar.
I
guess
I
mean
to
be
a
discussion
on
that.
There
should
be
a
topple
over
that
can
be
custom
struck
with
a
deconstructed
method
somewhere
in
here
somebody
was
passive-aggressive.
G
C
B
Down
a
little
bit
right
there,
my
friend,
yes,
so
the
scroll
up,
so
the
enumerator
itself
is
under
room,
but
you'll
see
that's
enough
to
type
under
room
yep.
The
position
I
brought
as
a
top-level
type
in
system
text
just
because
I
that
would
make
it
easier
to
he's
ever
to
actually
have
as
a
local
yeah
alright
clean.
If
we
imagine
people
would
use
VAR
doesn't
matter.
C
Well,
you
could
just
hit
the
top
position,
but
yeah
I
mean
generally
not
a
fan
of
nested
fives
I.
Just
know
that
that's
a
good
question
then
well
yeah
I
mean.
Is
it
appropriate
to
have
lots
of
times
yeah,
so
I
think
in
general,
like
I,
think
nested
types
make
sense
when
you
basically
never
ought,
rather
than
their
names
right.
So,
for
example,
all
the
structures
numerate
or
if
you
never,
you,
never
declare
anything
with
that
signature.
You
you
you.
B
D
B
D
B
D
D
D
D
C
C
B
B
C
B
E
G
C
C
B
E
C
Quality
all
whole
four
would
have
to
be
equal
well
for
quality
for
sure,
well,
yeah.
But
if
you
compare
them
that
will
be
weird,
because
what
would
you?
What
would
the
value
be?
Even
the
started,
makes
it
different
than
the
room
is
different
at
the
lower
part.
So
you
would
have
to
decide
that
I
I
don't
think
it
makes
sense
to
sort
it
used
to
be
almost
yeah.
D
B
So
the
there
is
a
difference
between
what
we
do
and
what
go.
Does
the
difference
is
that
if
we
encounter
invalid
data,
you
go
just
skips
one
byte
when
in
its
enumeration
we
might
skip
more
than
one
bite,
depending
on
how
much
data
was
in
that
one
or
depending
on
very
particularly
why
the
data
was
invalid,
because
we
follow
to
achieve
the
Unicode
recommendation
here
that
his
behavior,
the
framework
already
has
I'm
not
changing
it.
C
B
C
C
F
B
C
Know
I
get
what
I'm
saying
is
that
if
we
make
ruin
this?
The
second
argument,
then,
if
you
deconstruct
into
three
values,
it
looks
very
odd
because
when
you
have
started
next,
one
in
the
length
yeah,
it
just
seems
very
out
of
place,
like
logically
I
think
you
won't
ruin
starting
next
and
if
you
poured
some
gold
and
well,
you
have
to
come
with
a
ticket
other
things
as
well.
D
I
think
they
make
it
work.
Fine
I
suggested
an
analyzer
which
would
say,
if
you
have
like,
let's
say
deconstruct
method
or
you're,
passing
things
into
a
method
and
the
name
that
you're
passing
for
particular
index
matches
the
name
of
another
index.
It
should
be
flagged
and
if
we
had
such
an
analyzer,
that
would
help
catch
people
for
go
so.
B
One
other
thing
is
that
in
go
both
the
start
index
and
the
brand
value
itself
are
both
typed
as
int
you're.
The
room
is
kept
as
where
God
isn't,
which
means,
if
you
try
to
trick,
isn't
the
compiler
will
flag
up
even
without
an
analyzer
I
wasn't.
C
B
Well
sure
and
the
reason
length
is
promoted
as
a
first-class
properly
on
the
struct
is
because,
even
though
room
has
a
length
property
hanging
off
of
it
yeah,
it
might
give
you
a
different
value
right,
because
if
we
replaced
it,
for
instance
like
the
replacement
room
is
ffft
which
is
going
to
have
length
3
or
2
or
I'm.
Sorry
it'll
have
length
1
or
3,
depending
of
we
might
give
you
a
different
answer,
so
you
can
set
it
to
german
anybody
looking
at
me
right
so.
D
B
E
B
C
C
B
B
B
B
F
C
B
B
B
Ever
hurt
you
so
long,
yes,
but
he
might
be
listening.
Okay,
it's
fine!
Oh
yes,
I'm
on
a
line
I
I
wanted
to
before
we
do
the
encoder
stuff
to
handle
the
API
review
that
Eric
brought
up
this
morning.
There
was
no
issue
for
it
because
it's
so
fresh,
but
I
can
show
you
what
it
is.
Go
fast,
yep
no
go
to
source,
don't
nothing!
G
B
B
B
B
C
B
B
G
G
F
D
B
You
cannot
construct
a
room
from
an
imbalance,
Kilauea
the
room
constructor
itself
with
Rome,
see
if
you
you,
if
you
use
unsafe
to
construct
or
unlikely
god
help
you
all
that
self.
At
that
point,.