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.

Static Typing gives you a head start, Tests help you finish

8 pointsby mingyeowalmost 16 years ago

2 comments

wheelsalmost 16 years ago
I never got the test-driven-development craze until I broke from mostly writing C and C++ and spent some time writing Ruby. This article gets at the crux of that: you <i>must</i> have tests to ensure even the most minimal level of functioning in duck-typed languages. Static typing gives you much of that for free (at, I would argue, very little cost).<p>Additionally, while the size of my Ruby implementations of components is smaller than their C++ counterparts, the Ruby components plus their tests are larger. (This would be less true were I not to use Qt in most of my C++.)
评论 #754776 未加载
antonovkaalmost 16 years ago
I'd summarize thusly: A powerful type-system provides tools to concisely express business/logic constraints and automatically enforce those constraints across the entirety of your codebase, significantly reducing the testing required to ensure proper operation of your code.