3 ms·
> However, the larger problem is that functions don’t declare what kinds of errors they return. They don’t need to. Static analysis (guru) can answer the quest
by teeray 5y ago
> However, the larger problem is that functions don’t declare what kinds of errors they return.
They don’t need to. Static analysis (guru) can answer the question “what kinds of error can this error be?” There’s no need to go source diving as the author suggests.
- lokar 5y agoIMO this is a common failure in discussions about programming languages today. You really must consider the capabilities of "external" language tools (linters, static analysis, etc). Not having all that in the core language can be a reasonable design choice.
- ashtonkem 5y agoIt does depend somewhat on the quality and unanimity of those tools. Back when I did python there really wasn’t a consensus, well developed set of static analysis tools in order to answer these questions. This made programming python harder than it should’ve been, and the process of building those consensus tools was unnecessarily messy, and probably cost python more devs than need be Not having it in the core language can be a reasonable choice, but you still need to do community work to ensure that those needs are met somehow