3 ms·
The counter argument is the main argument for clean code and documentation -- code is consumed much more than it is produced. You can hack code together and fo
by humanrebar 13y ago
The counter argument is the main argument for clean code and documentation -- code is consumed much more than it is produced.
You can hack code together and forgo documenting it, but it's a form of technical debt. When creating a minimum viable product for a startup, taking on some forms of technical debt probably makes sense, but by the time you're talking about huge code bases, you're probably past the startup phase (I hope) and you're already up to your neck in technical debt.
- hyp0 13y agoRelated: static typing is itself documentation (low-cost, machine-checked documentation).
- brudgers 13y agoWhen the static type checking system has an inference engine there is a strong incentive not to document types on the part of programmers. Conversely, a requirement that for explicit type declarations makes the use of generics more cumbersome.
- Peaker 13y agoFortunately, your IDE can use inference to add a type signature with a keystroke.
- steveklabnik 13y agoAnd now you've added the cost of mandating an IDE, and someone has to write that feature for the IDE in the first place.
- Peaker 13y agoThe feature exists in emacs and vim, and is nice but not mandatory. It should be easy to integrate into any editor.
- steveklabnik 13y ago"It should be easy to integrate" is the downfall of many a software developer. Anyway, my point is not that it's difficult or bad: it's that it's has _some_ cost.
- Dewie 13y ago> When the static type checking system has an inference engine there is a strong incentive not to document types on the part of programmers. But then the compiler has the capacity to write/emit the type declarations.
- mercurial 13y ago> When the static type checking system has an inference engine there is a strong incentive not to document types on the part of programmers. Not the case in Haskell, at least. Most Haskell code out uses type signatures. > Conversely, a requirement that for explicit type declarations makes the use of generics more cumbersome. True enough, but you can't have your cake and eat it. Either you want explicit documentation-by-types, which has a cost, or you don't (which also has a cost in terms of maintenance).
- krupan 13y agoYes, but mostly this type of documentation: http://photos1.blogger.com/blogger2/1715/1669/1600/larson-oct-1987.gif http://photos1.blogger.com/blogger2/1715/1669/1600/larson-oc...