Hey HN!<p>Just from writing applications in both python, typescript and rust I have developed a tacit understanding of the different type systems.<p>Typescript is very expressive and the ts-ignore is a nice escape hatch when you want to make something work first and then get the types to line up later. Rust doesn't have that and it's a kinda hard to make stuff quickly. Python just has horrible types – I run into type related issues at runtime all the time but probably a skill issue on my part.<p>I was wondering – is there a book that's like a gentle introduction to type systems? Everyone keeps recommending me text books and tbh I don't have time to go through it. But I would like to have a somewhat surface level understanding of how the "pros" talk about type systems. What does TS have that Python doesn't and why is Rust more aggressive than TS?<p>Not trying to make my compiler but just trying to develop a formal understanding of various type systems and how they differ.
I first learned about types in "Head-First Java". I don't know how comprehensive it is, but the whole design of that book series is meant to be unintimidating. (Pictures with captions, illustrations....)
TypeScript has a Turing complete type system so it's as powerful as it gets in terms of what can be expressed in the type system. As for learning and understanding what is going on with type systems in general you'll have to go through a textbook if you really want to develop an understanding. Type systems (not Turing complete ones) are fundamentally logical systems and I don't know how you can understand type systems without actually going through the trouble of understanding the underlying logical fundamentals.