4 ms·
Python was heading downhill ever since people started introducing typing outside of the actual "typing" module. We could have kept it as a module-only thing an
by wheelerof4te 3y ago
Python was heading downhill ever since people started introducing typing outside of the actual "typing" module.
We could have kept it as a module-only thing and it would have made it entirely optional feature that you could easily introduce or remove depending on Python version you were targeting. Now, you have types all over and new ways to type random things keep popping up. And of course, that motivated people to propose more stuff like this.
Just utter meaningless "feature", making this language even more convoluted than it already is ever since Guido sold out to Microsoft. Yes, I get it, it's his language and he can do whatever he wants with it. But a lot of people contributed to Python over the decades. And not a lot of them agree on where it is heading.
A sad thing, really.
EDIT: Downvote me to oblivion. Someone had to say it.
- throwmeout123 3y agoExcellent. Python is becoming horrible and losing many of the good qualities it had to cater to a crowd of people that would be better served by java and c# Popularity is a curse, quality goes downhill superfast
- qsort 3y agoSince you're asking, I did downvote this comment. My reasoning is that it is factually dubious and unrelated to the topic. The typing features are optional, so much so that CPython by default doesn't do anything with them. >>> def f(x: int): ... return 2 * x ... >>> f(1) 2 >>> f("hello") 'hellohello' It's also a weird claim that typing is unpopular, since it's almost universally considered to be a Good Thing™. The rest of the comment honestly sounds like a rant. Python has had governance independent of Guido for some time now, I don't really get the point.
- wheelerof4te 3y ago> The typing features are optional, so much so that CPython by default doesn't do anything with them. That is true...for now. But let us look at these two PEPs, only: https://peps.python.org/pep-0585/s https://peps.python.org/pep-0585/s and https://peps.python.org/pep-0604/ https://peps.python.org/pep-0604/ PEP 585 added new syntax for built-in collection types that doesn't work with older versions of Python. PEP 604 also added new Union and Optional typing syntax that doesn't work with older versions of Python, either. So, you will effectively break your code if you try adding any of these. In a large enough codebase, there could be dozens of these annoying things. Why do that when you could have offloaded every single typing annotation to it's separate module (conveniently called typing), and add a simple shortcut to an IDE to have types removed/re-introduced automatically. There are even more built-in ways to type your arguments now. So, let's see how long your argument stands.
- squeaky-clean 3y ago> So, you will effectively break your code if you try adding any of these. I don't follow, isn't this just bringing in features from a later version of the language and complaining they don't work? Pattern matching doesn't work in Python 3.9, but I wouldn't say it "effectively breaks your code" just because you try them in python3.9 You also don't have to add them, they're optional.
- wheelerof4te 3y agoIntroducing pattern matching to Python, in a minor version no less, almost created another language inside Python that you have to learn now. New typing syntax outside of the "typing" module did the same. People governing the development of Python forgot what backwards compatibility of a programming language means.
- squeaky-clean 3y agoYou don't need to learn any of those, and they don't break pre-existing code. You can run code written for Python3.2 in 3.10. You can't run code written for Python3.10 in Python3.2. That's what backwards compatibility means. It has nothing to do with new features that only affect themselves. Also Python predates SemVer, so it doesn't use major.minor.patch. 3.10 is not considered a minor update.
- qsort 3y agohttps://peps.python.org/pep-0484/ https://peps.python.org/pep-0484/ > It should also be emphasized that Python will remain a dynamically typed language, and the authors have no desire to ever make type hints mandatory, even by convention.
- deleted 3y ago[deleted]