4 ms·
"The claim that untyped code has fewer bugs is completely bonkers" There are plenty of academic sources that will tell you that the number of bugs in a program
by ReflectedImage 4y ago
"The claim that untyped code has fewer bugs is completely bonkers"
There are plenty of academic sources that will tell you that the number of bugs in a program is directly proportional to the number of lines in the program and static typing has no effect on this.
https://stackoverflow.com/questions/2898571/basis-for-claim-that-the-number-of-bugs-per-line-of-code-is-constant-regardless https://stackoverflow.com/questions/2898571/basis-for-claim-...
Additionally, statically typed code involves large amounts of boilerplate code in the form of abstract base classes, interfaces, generics, templating, etc. It's a very verbose code style.
It's your turn, find an academic source to backup your claim that static typing reduces the number of bugs. Cause it just isn't true.
Microsoft, google and Facebook have a lot of programmers coming from languages with static typing and want to make Python more familiar.
It's a far distance away from anything resembling good practice.
Actual Python houses typically don't use static typing.
- bombolo 4y agoPlease don't reply multiple times to the same thing. > Actual Python houses typically don't use static typing. If you had ever developed python professionally, you'd know this to be untrue. Also your "paper" points to a 404 page.
- ReflectedImage 4y agoI have developed in a lot of Python houses. Given that type hints are a new language feature in Python, please explain to me how these Python houses used static typing when type hints didn't exist? I'm all ears.
- bombolo 4y ago> Given that type hints are a new language feature in Python, please explain to me how these Python houses used static typing when type hints didn't exist? They've existed since 2015… please explain me how 2015 is "new"?
- ReflectedImage 4y agoPython has been around since 1991. I'm little bit more experienced than you.
- bombolo 4y agoYou seem to have no experience with type hints… You could have acquired this experience but didn't. No shame, but you are not the most qualified person to comment on typing. Also python3 is from 2008, and it's effectively a different programming language.
- ReflectedImage 4y agoI have experience in working on statically typed Python codebases, it's just obviously inferior. I'll go further and tell you the most common reason for using static typing is to allow the codebase to be a monolith like it's still the 90s. You shouldn't be trying to build a monolith in a scripting language it's a recipe for disaster. I'm a polyglot, I'm exactly the sort of person who should be commenting. Does it surprise you that static typing is often a poor choice? Static typing is something to be used when the performance of your code is important. I've done 40 Gbits/sec network traffic processing, certainly static typing is used for that. Your standard business CRUD app? Usually dynamic is the better choice.
- bombolo 4y ago> I have experience in working on statically typed Python codebases, it's just obviously inferior. Maybe they just were inferior projects? I've used a library where every function just accepted "args, *kwargs" and no documentation was given. In that case it's not really the fault of the language that it sucks. It could be a similar case for you. > I'm a polyglot, I'm exactly the sort of person who should be commenting. Ok I speak 3 languages fluently and 1 more so-so… But what does this have to do with python typing???? In fact most people who study literature and languages don't know much about python types. > Does it surprise you that static typing is often a poor choice? No because it isn't true. > Static typing is something to be used when the performance of your code is important. We can all agree that python isn't something to use when performances are very important. > Your standard business CRUD app? Usually dynamic is the better choice. Ok. That's not what I do though. Have you done any C and C++? You know how people prefer doing a list in C++ with a template rather than a list of void in C? Same thing in python. But perhaps you haven't experience in this field either?
- UncleMeat 4y agoNot across different languages. Create a new version of Java that requires an empty line between each line containing text and bugs won’t double.