DAVID MALAN: --view of what
cryptography is actually all about.
So let's get there.
Let's now look underneath
the of something--
String.
There is no string.
DOUG LLOYD: There's no
such thing as a string.
We're doing a deliberate, but I
think an effective, abstraction here.
DAVID MALAN: Yeah.
I think it's a good incarnation
of exactly that, because I think
we would very quickly
get lost in the weeds
if we introduce char star,
and pointers, and all of that
so early in the semester.
So this is just a one
liner in the CS50 library.
We typed f string to just
char star, so that we
don't have to talk about it at
that low level for a few weeks.
DOUG LLOYD: But by this
point we are now starting
to introduce the concepts
of arrays and we can
talk about collections of information.
DAVID MALAN: I think most
any student can appreciate
that, right, like a string is just
what we'll call an array, back to back,
and you have the nice square
bracket notation to manipulate it,
and that's it.
DOUG LLOYD: You don't have to get stuck
in-- like you said-- like pointers,
or see a char star and have
to use that all the time.
It's nice to have something just that
feels different, character is a word,
a character is a letter,
a string is a word,
these are two different things
even though eventually we're
going to see they're really just--
they're similar, they're much more
similar than they might first appear.
DAVID MALAN: And it's
nice because you can then
get to the core of what it
means to be a string ultimately.
That once we start talking
about memory and what's
beyond the A in
[? Zamayla, ?] the second A
in [? Zamayla, ?] like what is
actually there terminating the string
and keeping it from flowing into some
other name or some other string, that's
also there in memory.
And there too, I mean even if week
two I'm sort of inclined already
to want to talk about memory.
Because at the end of
the day, we're going
to find that that is by
far the most effective,
I think, and ultimately accessible
way of explaining these higher level
abstractions is just take
away the abstraction and show
what's actually there.
I certainly don't think
it's beyond students
even just a few weeks into the class.
DOUG LLOYD: It is
strange thought that C--
in a lot of modern
languages kind of blur
the line between a
character and a string,
so it's strange that C
doesn't have this at all,
it might surprise people to know
that string is a native data type.
DAVID MALAN: Yeah, indeed.
If you want it you have to
build it yourself pretty much.
