[VIDEO PLAYBACK]
DAVID MALAN: --the equivalent C version.
So guess what else we
can do with Python?
Not only can we re-implement all of
weeks one through five's examples from
C in Python, so can we
implement the entirety--
[END PLAYBACK]
DOUG LLOYD: That was his.
So, much like a number of the staff,
I actually had not extensively
programmed in Python myself.
And so I was actually
sitting in the audience
when this lecture was being filmed.
I don't remember you doing this at
this time in the lecture, though.
DAVID MALAN: Sometimes entire
blocks of material slip my mind,
and we realize after
shooting a two-hour lecture,
oh shoot, forgot an additional example.
And this one has actually
been important, I think,
so this is the example in which we
translate problem set five in CS50
from C to Python, the
spell checking problem set.
And the whole point, and we've
done this for years in PHP as well,
is to demonstrate just
how much more quickly
and with how many
fewer lines of code you
can implement the exact
same functionality
in a higher-level language
like PHP or Python
and to show also the
price you pay, typically,
in performance because of the
overhead of interpreting the source
code in Python.
DOUG LLOYD: Right, because
it's not pre-compiled
so you have to deal with that step.
DAVID MALAN: Indeed, now
we're not-- yeah, exactly,
not manually compiled as students
might have with Clang, for instance,
in the world of C. So, yes,
this is a bit of movie magic.
We might have shot this after the
lecture wrapped and then went back in,
and our team kindly
sliced it in earlier.
And no one would know this--
DOUG LLOYD: --but for the fact
that this is CS50 explained,
and we have a chance to talk about it.
DAVID MALAN: Thanks for explaining that.
