Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> In other words, the benefit of maintaining type signatures now well outweighs the cost.

That's a rather bold claim to begin your argument, but there are no references.

There's a good review of related studies here: https://danluu.com/empirical-pl/



It's fairly obvious that for the any public facing API, type signatures are going to be a net positive, because you have to write input validation for your API anyway to have any hope of it being secure.

You can either write as a series of buggy, hard to understand if statements or use a well-defined schema tool of some sort. Furthermore, once you have the schema you can generate client APIs in e.g Typescript for your APIs instead of wasting engineering effort on writing them manually.

In terms of static types generally, outside of APIs, the equation can be different. However, if you are creating a library that many developers will use, given the state of IDEs, your just hurting your users (developers) by not providing static types. I use Typescript in every single project not because of supposed benefit of "type grantees", but because I don't need to spend all day flipping between some developers poorly written, incomplete docs to understand how to use an API. My code editor will tell me the whole format and I can explore the APIs with goto definition, demonstrably reducing development time.


Agreed. The unconditional nature of the statement detracts from its message. Had it said: "we see benefits in static types for APIs, and it's working for us - here's why" it would have had some credibility. And provided some insight on why it might work for others too.

Contrast with DHH's articulation on the corecursive podcast [0]. Paraphrasing:

* Dynamic types work for him * People don't all think the same. So static typing is fine too.

Jeremy Howard made essentially the same point on TWIML AI [1].

The point is there's far more to success than static vs dynamic typing. Personal preferences, team skills, culture, task at hand, nature of domain, commercial imperatives, code base size, and many other things besides all influence choice.

To suggest there's a single, global answer to static vs dynamic - whether for languages or APIs - is a misguided and unhelpful simplification.

[0]: https://corecursive.com/045-david-heinemeier-hansson-softwar...

[1]: https://twimlai.com/whats-next-for-fast-ai-w-jeremy-howard/


I think a better way of phrasing this would be "the cost of maintaining type signatures has been reduced well below the benefits" since I believe buf makes tools to do just that.


I think it's both that the costs are going down, and that the benefits are going up, in the form of useful tooling that couldn't exist without schemas to drive it.

Quantifying these costs and benefits is, of course, notoriously difficult.




Consider applying for YC's Fall 2026 batch! Applications are open till July 27.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: