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

Guido van Rossum

๐Ÿ‘ค Person
1189 total appearances

Appearances Over Time

Podcast Appearances

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

in a complex business document and inside some of the bullets are other bulleted lists, you will indent those too.

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

If each bulleted list is indented several inches, then at two levels deep, there's no...

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

no space left on the page to put any of the words of the text.

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

So you can't indent too far.

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

On the other hand, if you don't indent at all, you can't tell whether something is a top-level bullet or a second-level bullet or a third-level bullet.

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

So you have to have some compromise.

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

And based on ancient conventions and sort of the typical width of a computer screen in the 80s,

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

and all sorts of things sort of

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

We came up with sort of four spaces as a compromise.

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

I mean, there are groups, there are large groups of people who code with two spaces per indent level.

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

For example, the Google Style Guide, all the Google Python code, and I think also all the Google C++ code is indented with only two spaces per block.

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

If you're not used to that, it's harder to, at a glance...

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

understand the code because the sort of the high level structure is determined by the indentation.

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

On the other hand, there are other programming languages where the indentation is eight spaces or a whole tab stop in sort of classic Unix.

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

And to me, that looks weird because you sort of after three indent levels, you've got no room left.

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

It doesn't have to be four spaces.

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

So you can code Python with two spaces per block or six spaces or 12 if you really want to go wild.

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

But sort of everything...

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

that belongs to the same block needs to be indented the same way.

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

In practice, in most other languages, people recommend doing that anyway.