TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Ask HN: A gentle introduction to type systems?

2 点作者 fardeem11 个月前
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 条评论

MilnerRoute11 个月前
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 个月前
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.