Guido van Rossum
๐ค PersonAppearances Over Time
Podcast Appearances
If you look at C or Rust or C++, all those languages, Java, don't have a requirement of indentation, but except in extreme cases...
They're just as anal about having their code properly indented.
they'd suggest the proper indentation for you.
Like in C, you type a few words and then you type a curly brace, which is their notion of sort of begin an indented block.
Then you hit return and then it automatically indents four or eight spaces depending on your style preferences or how your editor is configured.
Absolutely, yeah.
For a long time, I was actually convinced that the indentation was just better.
Without context, I would still claim that indentation is better.
It reduces clutter.
However, as I started to say earlier, context is almost everything.
And in the context of coding,
Most programmers are familiar with multiple languages, even if they're only good at one or two.
And apart from Python and maybe Fortran, I don't know how that's written these days anymore, but all the other languages, Java, Rust, C, C++, JavaScript, TypeScript, Perl, are all using curly braces to sort of indicate blocks.
And so Python is the odd one out.
Because context is not the whole story.
History, in a sense, provides more context.
So for Python...
There is no chance that we can switch.
Python is using curly braces for something else, dictionaries mostly.
We would get in trouble if we wanted to switch.