Dynamic types: where is the discussion?

All the studies I’ve seen come to similar conclusion. Some of the newer ones I saw use GitHub commit messages to try to estimate defect per LOC. The difference between typed and untyped is just so minor, and there’s so many unaccounted variables that you really can’t conclude anything.

I have a saying which I use a lot at work: “when two smart senior software engineer disagree and have heated arguments about a software related topic, you know it’s because neither is better than the other, and both are probably good enough for the task at hand.”

If one was obviously better, we still wouldn’t be debating static vs dynamic typing.

For example, types themselves are a great idea, but JavaScript was loosely typed, that’s one reason Typescript is popular, you cannot change the runtime to be strictly typed, but a static layer of strict typing can help.

I don’t think anyone would argue anymore for not having types or for loosely typed languages. Because types are clearly a good idea.

Having those types exist statically at compile time and be static at runtime though isn’t obviously better or worse than having them exist at runtime and be dynamic, and that’s why there’s no agreement.

There’s one thing that static types are obviously better at and everyone even Clojure is in favor of that, it’s that static types help with performance and efficiency. That’s why Clojure has type hints for example, or why it has vector-of.

Other then that, I think static vs dynamic is an ergonomic difference, and that inherently mean it’s a personal preference. What better fits your mental and physical frame. But you can’t take just the static or dynamic nature of types in isolation when it comes to ergonomics, you have to consider the whole language package. That’s why I both prefer statically typed languages over dynamically typed languages, and yet I prefer Clojure over the statically typed languages I know.

I think this is an illusion. Dynamically typed languages I believe in reality are multiple times more popular than statically typed ones, even though almost all big company seem to push for static ones, dynamic language still seem to prevail time and time again in popularity. Ruby, Python, JavaScript, Excel, SQL, Bash, Lua, PowerShell, etc.

Also interesting to think that mathematics tend to be dynamically typed as well…