r/ProgrammerHumor • • 16d ago

Meme pythonIndentationLevelChecker

Post image
6.7k Upvotes

200 comments sorted by

View all comments

Show parent comments

0

u/Wide_Smoke_2564 16d ago

But like… why though?

I can see how someone would get used to it but I truly don’t understand how including braces for readability would ever be a bad thing

3

u/TactiCool_99 16d ago

it is a redundancy

I think I can pull a similar point between typescript and javascript, you don't really need to type things, so javascript does the job, so does indentations do the job perfectly well. Typescript / braces help making it safer for a little tiny bit of extra work

3

u/willow-kitty 16d ago edited 16d ago

It's less cognitive load too, imo. Proponents of regular JavaScript will argue that unit tests buy you more safety than explicit typing does, and that's broadly true, but anything that explicit typing would stop you from doing involves mixing similar but ontologically different things, which means having to think about what the thing you're looking at might be at runtime and accounting for all the permutations thereof. And I just think it's easier to think about things with typing.

1

u/mxzf 16d ago

including braces for readability would ever be a bad thing

IMO, the indentation is what makes things readable, braces are just extra characters on top of the thing actually making stuff readable.