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

Chris Lattner

๐Ÿ‘ค Person
2524 total appearances

Appearances Over Time

Podcast Appearances

Lex Fridman Podcast
#381 โ€“ Chris Lattner: Future of Programming and AI

I think that the indentation is beautiful, but that's not a rational explanation.

Lex Fridman Podcast
#381 โ€“ Chris Lattner: Future of Programming and AI

But I can defend it rationally.

Lex Fridman Podcast
#381 โ€“ Chris Lattner: Future of Programming and AI

So first of all, Python 1 has millions of programmers.

Lex Fridman Podcast
#381 โ€“ Chris Lattner: Future of Programming and AI

It is huge.

Lex Fridman Podcast
#381 โ€“ Chris Lattner: Future of Programming and AI

It's everywhere.

Lex Fridman Podcast
#381 โ€“ Chris Lattner: Future of Programming and AI

It owns machine learning.

Lex Fridman Podcast
#381 โ€“ Chris Lattner: Future of Programming and AI

So factually, it is the thing.

Lex Fridman Podcast
#381 โ€“ Chris Lattner: Future of Programming and AI

Second of all, if you look at it, C code, C++ code, Java, whatever, Swift, curly brace languages also run through formatting tools and get indented.

Lex Fridman Podcast
#381 โ€“ Chris Lattner: Future of Programming and AI

And so if they're not indented correctly, first of all, it will twist your brain around.

Lex Fridman Podcast
#381 โ€“ Chris Lattner: Future of Programming and AI

It can lead to bugs.

Lex Fridman Podcast
#381 โ€“ Chris Lattner: Future of Programming and AI

There's notorious bugs that have happened across time where the indentation was wrong or misleading and it wasn't formatted right.

Lex Fridman Podcast
#381 โ€“ Chris Lattner: Future of Programming and AI

And so it turned into an issue, right?

Lex Fridman Podcast
#381 โ€“ Chris Lattner: Future of Programming and AI

And so what ends up happening in modern large-scale code bases is people run automatic formatters.

Lex Fridman Podcast
#381 โ€“ Chris Lattner: Future of Programming and AI

So now what you end up with is indentation and curly braces.

Lex Fridman Podcast
#381 โ€“ Chris Lattner: Future of Programming and AI

Well, if you're going to have

Lex Fridman Podcast
#381 โ€“ Chris Lattner: Future of Programming and AI

you know the notion of grouping why not have one thing right and get rid of all the clutter and have a more beautiful thing right also you look at many of these languages it's like okay well you can have curly braces or you can omit them if there's one statement or you just like enter this entire world of complicated design space that objectively you don't need if you have python style indentation so yeah i would love to actually see statistics on errors made because of indentation

Lex Fridman Podcast
#381 โ€“ Chris Lattner: Future of Programming and AI

I think it's probably pretty minor because once you get, like you use VS Code, I do too.

Lex Fridman Podcast
#381 โ€“ Chris Lattner: Future of Programming and AI

So if you get VS Code set up, it does the indentation for you generally, right?

Lex Fridman Podcast
#381 โ€“ Chris Lattner: Future of Programming and AI

And so you don't, you know, it's actually really nice to not have to fight it.

Lex Fridman Podcast
#381 โ€“ Chris Lattner: Future of Programming and AI

And then what you can see is the editor is telling you how your code will work by indenting it, which I think is pretty cool.