3 ms·
Part of the job is to know when to call it quits and refactor, there's no hard rule. In most cases I'll take a 130 line procedure with three flags that don't he
by mixedCase 4y ago
Part of the job is to know when to call it quits and refactor, there's no hard rule. In most cases I'll take a 130 line procedure with three flags that don't heavily interact with each other over three almost-identical 100 line functions.
- culi 4y agoPorque No los Dos? In languages with good support for functional features, you can curry and compose functions to your heart's content, allowing you to reuse similar logic and take better advantage of type systems like TypeScript's
- valand 4y agoIt comes down to how deep the type system of a language support this kind of operation. It'll work well with TS, Rust, but it doesn't add much to golang, C++. But well, usually dynamicizing statically-known types yields premature abstraction
- culi 4y agoI would actually call it "atomization" more than abstraction, but I agree it can often be premature