3 ms·
> 1. They are ugly. Honestly, the code with typing is not pythonic, at all. Not pythonic according to who, you? Besides, all the ugly type annotations could be
by parasense 5y ago
> 1. They are ugly. Honestly, the code with typing is not pythonic, at all.
Not pythonic according to who, you? Besides, all the ugly type annotations could be moved out of the executing code, and into separate files. https://www.python.org/dev/peps/pep-0484/#stub-files https://www.python.org/dev/peps/pep-0484/#stub-files
> 2. They require additional knowledge to implement correct type hints. The language is much less complex without them. It is even getting hard to track the changes without including typing.
Correct, one is required to know how to do something in order to do that thing correctly. This argument is fallacious because it relies on a truism. https://en.wikipedia.org/wiki/Truism https://en.wikipedia.org/wiki/Truism
> 3. It encourages bikeshedding on features useless to the core language. Manpower is wasted on something the majority of Python developers and applications don't really benefit from.
So a topic that causes vibrant discussion is a bad thing according to you? Okay, so assuming you actually believe that, would you then agree Python language features should be unilaterally implement without any discussion? If however the result of a discussion is an agreement to move one way or the other, and that outcome is according to you wasted time? Exactly which discussions are or not wastes of times, perhaps just the one's you don't like? People who make tough decisions, and who have tough conversations are the proverbial "adults in the room", so perhaps you should avoid those kind of things? (I'm not trying to disparage you, just say you might better choose what you ignore or pay attention to)
4. It creates the rift in the language. The language is "extended" with features that push the developing tools (such as Pycharm) in the certain direction. The editors and IDEs have become too reliant on type hints, so they changed their linting algorithms to basically require typing. Now they are nearly useless without them. This creates the division in our community and further pushes away those who don't want typing in their code. Sure, they are not required, at least for now. But people are really making it harder to develop without them.
There is no rift in the language. You are not required to use new features you don't want to use. For example: Got an issue with the walrus operator? Fine, write more lines of conditional statements to do the same thing. Don't like type analysis, fine... you run the risk of non-obvious bugs in the code you write, or hitting bugs with imported libraries 5-levels deep. As for the IDE's, you make a fair point... perhaps real programmers should use vim or Notepad instead? Type hints are going into most of the popular libraries, and unless your responsible for one of those, I fail to see your point... no body is forcing you to use type hints, much less vigorously encouraging you to use type hints. There is no type hints conspiracy to encourage you to use them.
5. It affects the startup performance. It is not a big hit if the application is small but it adds up.
I'm super skeptical of your claim. At most the runtime would have __annotations__ attributes declared, and you will have a difficult time persuading people that populating those magic double-under (dunder) variables has any significant cost. https://docs.python.org/3/library/typing.html#introspection-helpers https://docs.python.org/3/library/typing.html#introspection-...
> So please, stop with the useless typing PEPs. Fork the language if you must. But don't call it Python anymore.
Don't let the door kick you on the way out.