Re:I am disappointed by dynamic typing
by yamtaddle on Tuesday November 29, 2022 @06:25PM
(#33794838)
Interfaces and helper types and abstract interfaces and that sort of thing don't actually run, though... it'd be a neat trick to get anything resembling the bug rate of code-proper out of assistive structures like that. Besides, not all languages feature that so heavily in idiomatic code—not everything's Java.
Anyway, that "bloat" is documentation your computer can understand so it can tell you when it's wrong. The alternative is documentation your computer can't check. Or just skipping that and letting the next person eat the higher onboarding cost and defect rate, which I suspect is more often the case.
[EDIT] And it's not unit testing instead. It's in addition to. One's not a replacement for the other.
Re:I am disappointed by dynamic typing
by ReflectedImage on Tuesday November 29, 2022 @07:23PM
(#33795288)
Each line of that compiler only documentation increases the number of bugs in your code.
Bugs are directly proportional to total lines of code if you weren't aware
The increase in the code size usually results in significantly more bugs in the code.
Number of bugs is directly proportional to the number of lines.
The better way is to use unit testing instead.