Re:Why do dynamic languages make it more difficult to mainta...
by hyp0 on Monday January 27, 2014 @02:27PM
(#7132517)
Related: static typing is itself documentation (low-cost, machine-checked documentation).
Re:Why do dynamic languages make it more difficult to mainta...
by krupan on Monday January 27, 2014 @03:47PM
(#7133114)
Yes, but mostly this type of documentation: http://photos1.blogger.com/blogger2/1715/1669/1600/larson-oc...
Re:Why do dynamic languages make it more difficult to mainta...
by brudgers on Monday January 27, 2014 @02:54PM
(#7132721)
When 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.
Re:Why do dynamic languages make it more difficult to mainta...
by Peaker on Monday January 27, 2014 @03:02PM
(#7132781)
Fortunately, your IDE can use inference to add a type signature with a keystroke.
Re:Why do dynamic languages make it more difficult to mainta...
by steveklabnik on Monday January 27, 2014 @03:18PM
(#7132898)
And now you've added the cost of mandating an IDE, and someone has to write that feature for the IDE in the first place.
Re:Why do dynamic languages make it more difficult to mainta...
by Peaker on Monday January 27, 2014 @03:21PM
(#7132928)
The feature exists in emacs and vim, and is nice but not mandatory.
It should be easy to integrate into any editor.
Re:Why do dynamic languages make it more difficult to mainta...
by steveklabnik on Monday January 27, 2014 @04:24PM
(#7133339)
"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.
Re:Why do dynamic languages make it more difficult to mainta...
by mercurial on Monday January 27, 2014 @04:46PM
(#7133482)
> 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).
Re:Why do dynamic languages make it more difficult to mainta...
by Dewie on Monday January 27, 2014 @03:29PM
(#7132983)
> 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.
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.