4 ms·
Interestingly, the second approach is often recommended in functional languages, although in a slightly different way; compose complex/complicated logic of smal
by cygned 10y ago
Interestingly, the second approach is often recommended in functional languages, although in a slightly different way; compose complex/complicated logic of small pieces. You end up with a lot more functions but it allows for code reuse.
I am note quite sure, though, if we can already talk about an abstraction then.
- AstralStorm 10y agoThere is no code reuse of small non-generic functions in practice, just duplication and thus ravioli code. And to make these small functions generic costs time. What may make sense is to make something similar to lemma in proofs. This is strictly for ease of debugging or readability.