TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Ask HN: A gentle introduction to type systems?

2 pointsby fardeem11 months ago
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&#x27;t have that and it&#x27;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&#x27;s like a gentle introduction to type systems? Everyone keeps recommending me text books and tbh I don&#x27;t have time to go through it. But I would like to have a somewhat surface level understanding of how the &quot;pros&quot; talk about type systems. What does TS have that Python doesn&#x27;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.

2 comments

MilnerRoute11 months ago
I first learned about types in &quot;Head-First Java&quot;. I don&#x27;t know how comprehensive it is, but the whole design of that book series is meant to be unintimidating. (Pictures with captions, illustrations....)
soist11 months ago
TypeScript has a Turing complete type system so it&#x27;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&#x27;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&#x27;t know how you can understand type systems without actually going through the trouble of understanding the underlying logical fundamentals.