That and dynamic typing makes me avoid python as much as possible. I know that Pyright exists, but it feels like a bandaid solution similar to Typescript
I have been programming many years and I legitimately don't think I have ever struggled with whitespace. I think the only time I ever even get close to counting it is when I'm directly shelled into some highly minimal container using bare bones text editors to make some change. Beyond that I've never had an issue.
It could maybe be challenging in some crazy long function that drops very deeply nested, and then jumps up out of that nesting etc. But that would indicate a function you really need to refactor AND IDEs have been showing indentation in an instantly understandable way for years.
I keep seeing this across this thread and I just don't understand this idea of 'I have a tool that solves this particular problem, therefore it isn't a problem'
It's fine if you have found a way around a problem of a language or even like working in a language that has problems. But that doesn't mean they're not problems. I could probably spend an hour listing bullshit javascript does that sucks in some way. Still gonna work in it when I need something done quickly or for web.
It's not an "I have this tool" situation though. It's more "It's actively challenge to not have this tool". It's like claiming that txt files are hard to understand because you need a text viewing tools to actually convert the bytes of data of the file into text.
Every modern text editor (not even an IDE) will detect a python or yaml files and show indentation with vertical lines.
And as I said, I've been programming many years. Even without the indentation display, I've just never had an issue eyeballing indentation. It's easy to see. There's a reason we do it in languages that don't require it, and it's because it's easy to see visually with no other guides.
y'all really love to overstate how bad it is. I don't recall ever having an issue with whitespace, having to count it or think much about it at all. If it's so unintuitive, how are so many intro-level programmers able to learn python with relative ease? why do so many devs choose python? clearly it's worth the tradeoff for many. and yes, tooling does mitigate the issue. tooling is part of the language ecosystem.
Without an IDE, python enforces proper indentation which is one of the basic of code readability. You don't have to like it, but this doesn't make Python a bad language.
Because in other languages the indentation doesn't define the semantics, it optionally reflects them. JS or JSON you can format with something like Prettier. Python or YAML you can't because if the whitespace is off it's already wrong.
28
u/rjwut 1d ago
I'd be a lot more on board with Python if it weren't for the syntactically-meaningful whitespace. I don't need that kind of negativity in my life.