5 ms·
> more advanced, static type systems Are static type systems more advanced than dynamic type systems? This sounds surprising, given how much more one can do wi
by inconclusive 10y ago
> more advanced, static type systems
Are static type systems more advanced than dynamic type systems? This sounds surprising, given how much more one can do with a dynamic type system.
- rrradical 10y agoThe quality of a type system isn't measured solely by what it allows you to do. After all, no type system at all would allow you to do anything and write as many bugs as you want-- not great, right? Instead, a better type system will let you make guarantees about your code, while still allowing correct programs to run. Can you guarantee there are no type errors? Can you guarantee arrays aren't accessed out of bounds? That sort of thing.
- evincarofautumn 10y agoBasically, yes. You can do more with a dynamic type system than a static type system because you don’t need to (and actually, aren’t allowed to) prove that your code is consistent. Advancements in static checking and inference mean you can prove more things about your programs, so you don’t have to fall back on dynamic types and data structures so much.
- PeCaN 10y agoWell, you could look at a dynamic type system as just a static type system with 1 type—a sum type of everything. Looking at it that way, a dynamic type system is much less powerful.