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.
[ Parent
| on HN ]
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.