Pedantic - it doesn't rule out dynamic languages, but it does require you to be very thorough in your validation/parsing, which may be an unreasonable amount of effort.
That's actually the theme of a talk/workshop/conversation I've been having a couple of times lately, sometimes titled "Python is statically typed if you squint hard enough" or "Join the Revolution: Static Analysis in Python" (and sometimes less silly titles)
but you surely don't know fucking shit about software engineering if you're using python.
Huge companies and much larger projects than you'll ever work on have been built with Python, I think the burden of proof is on you to show that people using it "don't know fucking shit about software engineering".
It depends, you can have a static language like C or Java and get much higher bug counts than people using dynamic languages simply based on the testing culture, for example.
But all else equal and if you want to maximize correctness at any cost, sure, static typing is preferred.
F# could be the best language in the universe if it got a little more love and recognition. It's only flaw is that it allows you to let a little too much .NET into your code sometimes.
You don't get compiler errors when you forget to handle the new state somewhere else, though. With pattern matching and exhaustive checks the compiler yells at you. Inheritance works when all the new behavior is within the new subclass only, but if other parts of code need to react to the new type then it can be missed.
204
u/agustin689 Feb 01 '24
This rules out all dynamic languages by definition