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.

What Is Gradual Typing? (2009)

54 pointsby xisukarover 5 years ago

7 comments

ameixasecaover 5 years ago
&gt; Bad point. Type checkers only check fairly simple properties of your program.<p>Bad bad point. There are statically-typed languages with fairly complex type systems. There are even dependently typed languages which check essentially <i>any</i> property of you values and can be used to prove your program correct.<p>&gt; Most of the work in making sure that your program is correct [...] goes into developing comprehensive tests.<p>Tests can only show the presence of bugs, never the absence of them. This is not me speaking, this is Dijkstra.<p>It is ok to prefer one method over the other, but there&#x27;s clearly an aura of opinion on the statements of this article. It would be better for the reader to explicitly differentiate fact from opinion there.
评论 #21101656 未加载
评论 #21101990 未加载
评论 #21102553 未加载
评论 #21101666 未加载
评论 #21102955 未加载
bedersover 5 years ago
An important point of using dynamic types is not mentioned: The actual workflow of coders: Compile, run, fail, repeat vs. eval, fail, repeat.<p>After over 35 years of coding - mostly with statically compiled languages -doing it REPL-style makes such an enormous difference in my enjoyment of the profession. I&#x27;m not sure I can go back to a compiler.
评论 #21102688 未加载
评论 #21103709 未加载
评论 #21102565 未加载
6gvONxR4sf7oover 5 years ago
I really hope that in the future gradual typing and dependent types can come together into an ergonomic to use system where we can let the compiler check&#x2F;enforce proofs of correctness, but not require them. There&#x27;s a ladder of correctness (simple type checks, unit tests, integration tests, proofs of different aspects of correctness) and each has a tradeoff vs effort. It would be really great to be about to be able to move around it without rewriting much code, but rather by adding more and more annotations as needed for your use.
dangover 5 years ago
A thread from 2014: <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=8594079" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=8594079</a><p>2009: <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=556794" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=556794</a>
specialistover 5 years ago
I have some noob questions that I don&#x27;t know how to ask:<p>What, if any, is the relationship between type systems and pattern matching?<p>Does structural typing reduce the need for instanceof style tests?<p>So if a language uses structure typing, is pattern matching not useful, applicable?<p>--<p>Thanks for humoring me. I&#x27;m mostly a Java programmer, self taught, no CS background. I&#x27;ve been reading wiki articles about type systems, trying to figure out what it all means, how to get started. Inference, structural vs nominal, linear types... But, honestly, my eyes glaze over pretty quickly.<p>Am planning on powering thru Appel&#x27;s 2002 book, especially implementing the type system, but we&#x27;ll see how far I get.
评论 #21112085 未加载
ekvintrojover 5 years ago
This is an implementation of something similar on Smalltalk: <a href="https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=1b3RRE9a8NA" rel="nofollow">https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=1b3RRE9a8NA</a>
The_rationalistover 5 years ago
If I understand correctly, most language supports gradual typing today (typescript, c++, rust, etc) through &quot;any&quot;