Menu
Sign In Search Podcasts Charts People & Topics Add Podcast API Blog Pricing

Guido van Rossum

๐Ÿ‘ค Speaker
See mentions of this person in podcasts
1189 total appearances

Appearances Over Time

Podcast Appearances

Lex Fridman Podcast
#341 โ€“ Guido van Rossum: Python and the Future of Programming

And here is a function that returns a list of strings.

Lex Fridman Podcast
#341 โ€“ Guido van Rossum: Python and the Future of Programming

But that's not checked when you run the code.

Lex Fridman Podcast
#341 โ€“ Guido van Rossum: Python and the Future of Programming

But exactly.

Lex Fridman Podcast
#341 โ€“ Guido van Rossum: Python and the Future of Programming

There is a separate piece of software called a static type checker that reads all your source code without executing it and thinks long and hard about...

Lex Fridman Podcast
#341 โ€“ Guido van Rossum: Python and the Future of Programming

what it looks from just reading the code that code might be doing.

Lex Fridman Podcast
#341 โ€“ Guido van Rossum: Python and the Future of Programming

and double checks if that makes sense if you take the types as annotated into account.

Lex Fridman Podcast
#341 โ€“ Guido van Rossum: Python and the Future of Programming

So this is something you're supposed to run as you develop?

Lex Fridman Podcast
#341 โ€“ Guido van Rossum: Python and the Future of Programming

It's like a linter, yeah.

Lex Fridman Podcast
#341 โ€“ Guido van Rossum: Python and the Future of Programming

That's definitely a development tool, but the type annotations currently are not used for speeding up the interpreter.

Lex Fridman Podcast
#341 โ€“ Guido van Rossum: Python and the Future of Programming

And there are a number of reasons.

Lex Fridman Podcast
#341 โ€“ Guido van Rossum: Python and the Future of Programming

Many people don't use them.

Lex Fridman Podcast
#341 โ€“ Guido van Rossum: Python and the Future of Programming

Even when they do use them, they sometimes contain lies, where the static type checker says everything's fine.

Lex Fridman Podcast
#341 โ€“ Guido van Rossum: Python and the Future of Programming

I cannot prove that this integer is ever not an integer, but at runtime, somehow someone manages to violate that assumption.

Lex Fridman Podcast
#341 โ€“ Guido van Rossum: Python and the Future of Programming

And the interpreter...

Lex Fridman Podcast
#341 โ€“ Guido van Rossum: Python and the Future of Programming

ends up doing just fine.

Lex Fridman Podcast
#341 โ€“ Guido van Rossum: Python and the Future of Programming

If we started enforcing type annotations in Python, many Python programs would no longer work.

Lex Fridman Podcast
#341 โ€“ Guido van Rossum: Python and the Future of Programming

And some Python programs wouldn't even be possible because they're too dynamic.

Lex Fridman Podcast
#341 โ€“ Guido van Rossum: Python and the Future of Programming

And so we made a choice of not using the annotations.

Lex Fridman Podcast
#341 โ€“ Guido van Rossum: Python and the Future of Programming

There is a possible future where eventually

Lex Fridman Podcast
#341 โ€“ Guido van Rossum: Python and the Future of Programming

three, four, five releases in the future, we could start using those annotations to sort of provide hints because we can still say, well, the source code leads us to believe that these X and Y are both integers.