6 ms·
Do people commonly think types are a solution to most or all problems? Other than correctness I am not sure what software engineering problems a type system ac
by betterunix2 5y ago
Do people commonly think types are a solution to most or all problems? Other than correctness I am not sure what software engineering problems a type system actually solves, and the rest of the debate is about the expressiveness of the type system (or lack thereof, which forces suboptimal engineering practices in some languages).
- preseinger 5y ago> Do people commonly think types are a solution to most or all problems? There's certainly a subclass of programmers who believe this, yes.
- conradludgate 5y agoStatic typing is just another form of static analysis. However, it's static analysis enforced by the language rather than a third party tool. That allows me to be confident in my dependencies too if I see them putting the type system to work. Protobuf is moving us that way with microservices too. Since they're a strongly typed message format, it's harder to make mistakes in the interface between two services. I also like that languages can have complete local static analysis. Sure, the business requirements might be large and spread across many areas, but I will break them down into smaller chunks and encode invariants into the type system so that if the small chunk compiles, I am confident it does exactly what I expect, and I don't need to remember exactly where it fits in the larger picture