by spoils19 · 3y ago · 0 comments
I think that is a bit of a false framing. To wit, any system of 100k LOC will be hard to get into. Even harder to make changes in. There is no getting around that. None. Even worse if you have many entities flying about these 100k LOC. Each change to an entity will be dangerous. Static or dynamic. Especially if they are persisted anywhere, as at that point it is all too easy to get static guarantees that aren't reflecting actual data.
You need all the help you can get maintaining large codebases and static typing is a huge help.
Static analysis is, of course, good. If that is static typing or otherwise. So is running the code making sure it does what you want when running.
What is not a huge help, is a byzantine type hierarchy that nobody understands. Which is all too familiar to me from any codebase I have worked on with folks that dived straight into the type system before they knew what they were doing in the system.
Many strong type proponents have moved to the categories view. If you know the category type of what you are doing, the idea is that that will prevent bugs. But... that hasn't been my experience. Often it just hides what is actually happening behind another layer of jargon. Jargon that is not native to the problem being solved.
I bet that if you did a survey of developers who have worked on projects of this scale, 90% would disagree with your opinion.
I’ve been writing in python for 18 years, and yet I can far more quickly get into a large typescript codebase than a python one of equivalent size.
To get a gut feeling of the system, i.e., to understand the 10000 foot view of a 100k LOC system, is orders of magnitude easier with statically typed languages than dynamic languages.
And that is mostly because those 100k LOC are done by probably dozens of developers and that leads to different styles, approaches, conventions, etc.
A statically typed language would remove a lot of those headaches, because it does force a semblance of structure, that can be easy to reason with.
A language like Python is awesome for a micro-services architecture though.
This is no different from any system. Want to know how your car works? Start with a simplified diagram and gradually add more details.
Cars and other equipment are an amusing case study. What is the strongly typed version of a car schematics? Why does it look so different from what we think the idealized software should look like?
WASM will probably kill TypeScript shortly.
The two other languages you mention, TypeScript and WASM, are more part of the same platform mutually benefiting from the progress than competing each other.
Source: I have spent years coding in C++/Java, then Python. I have migrated Java projects into Python
I have not had a chance to learn or use a language like Go. But production use of Python, including building large code bases is real. We do resort to numba, cython or using Python API to compiled code.
I'm now involved in converting large codebases from SAS to Python. I don't think I will have the luxury of choosing another language like Go, for a number of reasons.
Heck, just look at static typing in Python.
It means having a distinct type for any complex structure you pass around (think pre-normalization API params, post-normalization API params, slightly enriched post-processing data as separate type vs a dict of str to anything in Python), or anything you want to make compatible (think interfaces vs duck typing).
As soon as the types get complicated, the code bloat begins.