We don't seem to be able to measure it, despite people trying several wacky approaches.
Either that means it's hard to measure, or it means the effect is not actually there.
Either way, this means that we cannot say that static typing reduces bugs.
> all massively complex systems that I personally have worked with that run for decades transacting billions$ etc without flaws are all statically typed
Did you try building the same systems without static typing as well and see what the difference was?
Or are you just saying that you built systems with static typing and they were successful? That tells you nothing about static typing except that it doesn't prevent successful programs, which is a very weak thing to be able to claim!
Lots of people, like you, think static typing is very important for developing software, but when someone challenges this and says 'can you actually show that?' they have never been able to. At some point you need to reconsider if it's actually the case.
I do reconsider it all the time; we only have short lives and I cannot build a lot large systems in my life. So that is why I asked if how it is measured. I see that my teams are more effective with static typing, but that also is my management as I, as I said, cannot really imagine writing large systems in not statically typed systems. I write a lot of scheme and k and bash and wrote a lot of tcl and Perl but never could get to scale like I can with statically compiled languages.
I lean more to dependently typed languages than dynamic as I simply saw only misery, but, again, this is not saying anything, it is just my experience. I am a bit afraid though, because there is no clear measurement, it is just anyone’s experience.
Edit; which actually would be fine; if it works for you and your team, company and business goals…
> I see that my teams are more effective with static typing
If you think you really can see evidence for it then I'd encourage you to write up a paper and submit it for peer review. I guess when you sat down to write it you'd suddenly realise that you don't actually have any hard evidence.
> cannot really imagine writing large systems in not statically typed systems
Ok but lack of imagination is not science. Some people cannot imagine a spherical Earth, but that doesn't make it untrue.
For example I work on a system in a dynamically typed language (Ruby) that successfully handles tens of billions a year, so we know that it is possible. (We are adding optional static typing to it, but it was written without it.)
Sure, but that’s what I said in the first place. It all seems there is no evidence, not even empirical for either way. I was looking for any, if there was. MS or whatnot must have something no?
Maintainability, tooling, and some people would argue for reducing bugs - but I'd challenge them in the same way I challenge you - can they prove it? And I would guess that they cannot.
If the person I was replying to was saying that they could not imagine a large system without types, and well they don't have to since I gave them a real example.
Something else I find rather likely is that different people are working most effectively with different methodologies (a believe that is grounded in the repeated experience of being shocked at how other people program and still be effective). So it is entirely plausible there is a self-selection bias that people that work best with strong types don't work on projects with weak types and vice verse. I guess its really hard to control for that effect when you want to look at big projects, since people need to be willing to work on that for a long time.
I agree it seems hard to prove; disappointed not more tried. Especially large companies that have skin in the game (MS with ts and c#/f#, Google with go and dart, oracle with Java, Mozilla with rust). Guess it’ll be a religious argument for some time to come and I will steer clear.
Perhaps it's like the LHC. Static typing reduces bugs above a certain project size, but we haven't been able to perform a study at large enough project sizes. Now if only we could get a bunch of governments all over the world on the case...
Either that means it's hard to measure, or it means the effect is not actually there.
Either way, this means that we cannot say that static typing reduces bugs.
> all massively complex systems that I personally have worked with that run for decades transacting billions$ etc without flaws are all statically typed
Did you try building the same systems without static typing as well and see what the difference was?
Or are you just saying that you built systems with static typing and they were successful? That tells you nothing about static typing except that it doesn't prevent successful programs, which is a very weak thing to be able to claim!
Lots of people, like you, think static typing is very important for developing software, but when someone challenges this and says 'can you actually show that?' they have never been able to. At some point you need to reconsider if it's actually the case.