4 ms·
I don’t agree there. Most of these extra classes are just type declarations with no methods at all. While the total LoC written might be higher, the amount of
by vbsteven 5y ago
I don’t agree there. Most of these extra classes are just type declarations with no methods at all.
While the total LoC written might be higher, the amount of written logic in which you can introduce bugs is less.
- CraigJPerry 5y agoFor any type A -> B operation, it's possible to fail - that is the whole point of parsing into type B, to catch when B's invariants would not be satisfied. The bug could be as simple as neglecting to handle that failure scenario. Some languages make this less likely (Haskell, Rust) but most mainstream languages will happily let you introduce this bug.
- LAC-Tech 5y agoI've caused myself a lot of problems by using/creating types that don't make sense. Coding myself into a corner. So I don't think it's fair to not count type declarations as code.