2 ms·
so your argument is, "you've got to write functions, therefore abstraction is always good" ? yeah man i don't start in main() and never write another function
by Kapura 3y ago
so your argument is, "you've got to write functions, therefore abstraction is always good" ?
yeah man i don't start in main() and never write another function ever again. You got me. But I also don't aggressively police duplication, accepting that I would always rather see what's happening without file-hopping. The correct abstractions will simplify code, and they will seem obvious (even if just in retrospect). Abstractions that force me to continually re-frame the problem i am trying to solve in terms of another's use case are antithetical to writing the sort of code that I do.
- wvenable 3y agoYou don't have to write functions. Have you ever seen a 10,000 line code that was just a single function -- I have. It also had nested if statements 5 levels deep to handle all sorts of logic with lots of duplication. It was unmaintainable. Yet it did meaningful work and it could have been refactored to a fraction of the size and do the same work. But, to be honest, when I had to fix it I just went it and fixed in the 20 places that needed changing because it was impossible to follow. You like good abstractions and you hate bad abstractions. I couldn't agree with that more.