4 ms·
As a python user I understand the need for better invariant checking, but should it be encoded in types, contracts or conventions?
by metalrain 8y ago
As a python user I understand the need for better invariant checking, but should it be encoded in types, contracts or conventions?
- rabidferret 8y agoMy goal wasn't so much to promote any specific answer, just to rebute the argument that the solution to memory safety bugs is to have better C programmers
- jschwartzi 8y agoYes. Often the difference between a mediocre programmer and an excellent programmer is ability to use tooling effectively to understand how their program works and where it fails.
- zaphar 8y agoI vote for all three. * Types so I can prevent all the low hanging fruit. * Contracts so I can encode invariants that the types can't always express. * Conventions so that everyone is talking the same language and there is less confusion
- lmm 8y agoTypes because they can be checked mechanically, simply enough that a programmer can understand the checking process and why it fails or succeeds, but are expressive enough (given some relatively cautious/widespread advances - HKT and some level of dependent typing) for every invariant I've ever needed.