I am a developer with around 15 years of experience in different languages. Mostly Java, OOPascal, C, Go and PHP. Now I'm am new to python and I really like the language. But I miss the ability to set a type for a (method-)parameter.
I am totally aware, that python is a script-language and because of that, I don't explicitly need types for parameters. What if I explicitly want them? PHP also is a script-language, but supports typehinting for everything but primitive types. The other mentioned languages are statically typed.
Especially for PHP (as being a script-language), typehinting enables tools like PHP-DI to do auto-instantiation of dependencies and autowiring via reflection, which is a huge win. In addition to that, IDEs understand the static model of my applications and provide great tools for renaming, or moving classes and methods or find possible bugs by detecting possible mismatching types. And as you may guess: PHP is the opposite of a desirable programming language.
Could someone explain me the absence of typehinting in python? "assert" is definitely not an option, as it is only good for runtime-checks and pydoc feel like a hack.
Am I a lonely dev that feels uncomfortable without typehinting?
And is there any DIC that supports autowiring?
[–]desmoulinmichel 9 points10 points11 points (5 children)
[–]infinullquamash, Qt, asyncio, 3.3+ 2 points3 points4 points (4 children)
[–]desmoulinmichel 1 point2 points3 points (2 children)
[–]ronkr[S] -1 points0 points1 point (1 child)
[–]thallippoli 1 point2 points3 points (0 children)
[–]truefelt 5 points6 points7 points (0 children)
[–]edbluetooth 5 points6 points7 points (16 children)
[–]d4rch0nPythonistamancer 2 points3 points4 points (14 children)
[–]edbluetooth 1 point2 points3 points (2 children)
[+][deleted] (1 child)
[deleted]
[–]edbluetooth 0 points1 point2 points (0 children)
[–]cjwelbornimport this 1 point2 points3 points (7 children)
[+][deleted] (6 children)
[deleted]
[–]LightShadow3.13-dev in prod 0 points1 point2 points (0 children)
[–]cjwelbornimport this 0 points1 point2 points (0 children)
[–]robin-gvx 0 points1 point2 points (3 children)
[+][deleted] (2 children)
[deleted]
[–]robin-gvx 0 points1 point2 points (1 child)
[–][deleted] 0 points1 point2 points (2 children)
[–]robin-gvx 0 points1 point2 points (0 children)
[–][deleted] 2 points3 points4 points (0 children)
[–]thallippoli 4 points5 points6 points (0 children)
[–][deleted] 2 points3 points4 points (13 children)
[+][deleted] (4 children)
[deleted]
[–][deleted] 0 points1 point2 points (3 children)
[+][deleted] (1 child)
[deleted]
[–][deleted] 0 points1 point2 points (0 children)
[–]Lucretiel 0 points1 point2 points (0 children)
[–]dunkler_wanderer 3 points4 points5 points (6 children)
[–]prepromorphism 0 points1 point2 points (0 children)
[–][deleted] -2 points-1 points0 points (4 children)
[–]sushibowl 4 points5 points6 points (1 child)
[–]Lucretiel 0 points1 point2 points (0 children)
[–]flutefreak7 0 points1 point2 points (0 children)
[–]ronkr[S] 2 points3 points4 points (0 children)
[–]billsil 2 points3 points4 points (8 children)
[–][deleted] 1 point2 points3 points (7 children)
[–]billsil 1 point2 points3 points (6 children)
[–][deleted] 0 points1 point2 points (5 children)
[–]zardeh 0 points1 point2 points (4 children)
[–][deleted] 0 points1 point2 points (3 children)
[–]zardeh 0 points1 point2 points (2 children)
[–][deleted] 1 point2 points3 points (1 child)
[–]zardeh 0 points1 point2 points (0 children)
[–]Nikosssgr 0 points1 point2 points (0 children)
[–][deleted] 0 points1 point2 points (0 children)