7 ms·
If you mean “Python programmers” to be random sysadmins that write hack code residing on a random EC2 instance then maybe you’re right. But most I get the sense
by smohare 4y ago
If you mean “Python programmers” to be random sysadmins that write hack code residing on a random EC2 instance then maybe you’re right. But most I get the sense you haven’t looked at many Python libs lately.
The added productivity of non-typed Python is such a ridiculous myth to anyone who has to maintain significant Python code bases. Sure, it makes you more productive for one-off exercises but the moment you’re having someone else inspect your code the productivity gains vanish. This largely true of dynamic languages more generally except in niche caches (e.g., ORMs) where types are strongly implicit.
I say all this as a mathematician that is used to reading papers full of symbols packed with implicit information. The code I’ve read from gung-ho dynamic typing advocates is some of the most painful drivel I’ve ever had to wade through.
- bayesian_horse 4y agoPython libraries aren't representative of Python code. The majority of Python programmers (not "just sysadmins" wherever that slur comes from) never publish or contribute to any libraries. I can compare Python's productivity to other languages, and it beats all of them so far. Another lesson I learned from working with statically typed languages: The quality of the code is more dependent on who writes it than on the language or even the ecosystem. But people are productive much sooner in Python than they are in C# or F#, and then we can work on the foot-gunning. Python's productivity isn't a myth. This is proven by its popularity and by successful projects across academia and industry alike.
- tibyat 4y ago
- grumpyprole 4y agoYou might be more productive in Python versus anything else for the scale and complexity of the software you are involved in, but you cannot make sweeping generalisations like this. I also think you fail to understand that in many situations, static type systems actually improve productivity, especially at scale or for non-trivial domains. This is of course why Python is now trying to retrofit them. There's also the argument that one is most productive in what they know. As someone who has spent far too long with Haskell and OCaml, Python's semantics and libraries often seem surprising and counterintuitive to me.
- bayesian_horse 4y agoI "fail to understand" something you actually never did or experienced, right? I know that a lot of companies are maintaining large Python codebases, and the "lack of typechecking" might be one of the biggest pain points, but the total pain is a lot less. That was always my experience and most people who say differently haven't actually used Python that ... I know that Typescript helped me over Javascript. I don't get that benefit from Mypy yet, but the "pain" just isn't as great as it was with JS. And I've seen what inexperienced programmers do when a static typecheckers try to force or encourage them to do the right thing. It's not necessarily the right thing, just a lot more complicated than it needs to be.
- grumpyprole 4y ago> I "fail to understand" something you actually never did or experienced, right? No, I have worked at a variety of large institutions that have millions of lines of Python. I work with it often. The use of Python is more about it being accessible for non-developers, which is why they also teach it in schools; and the need for a standard. It is the new "Visual Basic". Again, it is not more productive in all situations.
- rwmj 4y agoThe number of times I've stared at some random Python function deep inside a library wondering what does this function return? Even the docs often don't say.
- oriolid 4y agoIt was very productive for the person who wrote the library.
- wheelerof4te 4y agoWell, the author of that undocumented function maybe did not mean for it to become widely used. There are a lot of "libraries" people write for their use only, who then put them on Github as a token of good will. You as a user of someone else's library can either contribute to it or learn to use it. Otherwise, write your own equivalent.
- oriolid 4y ago> Otherwise, write your own equivalent. And be judged for wasting time reinventing a wheel?
- wheelerof4te 4y agoHey, it is still your wheel, built according to your use-cases. That is never a waste of time.
- CraigJPerry 4y agoWould you be able to share an example of this? I took a random stab in pandas but they’ve adopted type annotations so that defeats the point. So i thought old-school code bases - zope sprang to mind, but that’s not a good example either because they use docstrings and it’s kind of obvious. So i tried gunicorn on a whim and they have even more attention spent on their docstrings. I just want to sample this feeling of lost confusion in python so that i can figure out how I’d deal with it.
- 4y ago
- krageon 4y agoIf you write more code that is untyped than typed, you are harming whoever comes after you. Untyped code is an absolute dragon even if it is properly documented (which it practically never is). Glorifying "productivity" and putting it above the greater good is essentially everything that's wrong with the world, at every level.
- notpachet 4y agoprogramming languages : diehard dynamic typing advocates :: global pandemic : mask mandate protesters
- bayesian_horse 4y agoThere is no conclusive and objective evidence that static typing helps at all. Studies are at best inconclusive, certainly a far cry from confirming the superiority of static typing. Everything else is subjective. To have a recent and complete opinion about the one thing you necessarily need to have less of a recent and complete experience with another. The benefits of masks against spreading respiratory viruses are easily and objectively proven. Completely different thing.
- notpachet 4y agoWell, while you're waiting for that study to ride down from heaven on a white horse clad in gold, the rest of us are going to just quietly get on with being (subjectively) more productive.
- _Algernon_ 4y agohttps://link.springer.com/article/10.1007/s10664-013-9289-1 https://link.springer.com/article/10.1007/s10664-013-9289-1
- CraigJPerry 4y agoThat’s quite a strongly worded opinion. It sounds like it should be utterly trivial in this case to show that typed code causes less harm. I’m happy with whatever definition of harm you’re happy with. So where can i review the data supporting such a strongly worded position?
- analog31 4y agoIn my view it's both. I'm one of those "scientific" programmers. I've used type hints, just to learn it, but tend not to use them in practice. Bugs caused by typing errors seem to be extremely rare in my little world. I've also programmed extensively in Pascal, assembly, and C. I get it about types. Don't forget C has 8 different types of integers that have to be kept straight. ;-) On the other hand, I realize that any of my programs is but a little nub of code sitting on top of large and expertly maintained libraries. I'm grateful for whatever the authors of those libraries are doing to keep their sanity, and am not surprised when I see type hints in those codes.
- bayesian_horse 4y agoIf you have programmed extensively in Pascal, assembly and C, you aren't "one of those scientific programmers". Or at least not the newer generation that got started on R, Python and maybe SAS...
- gilbetron 4y agoOn the small scale, Python is very productive. Once you get to large codebases with a rotating roster of many developers, it becomes a net negative, which is why type specification languages are gaining major inroads. I love Python, but I wouldn't write anything for production at any scale in it anymore. But for small scale stuff, it remains my favorite! (Although, I like static binaries languages, like Go, for a lot of things these days because of the deployment simplicity)
- bayesian_horse 4y agoWhat is "major inroads"? Python is actually rising in popularity and major companies are building big things entirely in Python... In my opinion there is no excuse not to.
- icedchai 4y agoMajor companies build things entirely in Javascript, too. Popularity doesn't mean anything. Honestly, for a small web app, I'd pick PHP / Laravel over Python. Deployment is way simpler.
- foepys 4y agoWhat you both are experiencing is your bubbles clashing.
- tezzy 4y agoI have been developing almost exclusively in Python for the last 4 years (occasional C#, Java and PHP) and although my entire team disparages PHP it is really quicker and fewer characters for most stuff. Luckily IDEs can auto add the imports, but sometimes a slightly mistyped piece of code auto adds an import I need to delete, I love avoiding imports and circular imports in PHP. The other nice thing is avoiding random python behaviour differences in MacOS, Windows and Ubuntu. Code that works fine in CircleCI but not locally. Works on a Mac but not on windows etc… I didn’t experience that with PHP. Not sure there are a huge number of long term PHP devs who switch to Python or the other way around to have a reasonable opinion.