3 ms·
I hate asking the question "is this function called from different places, or was it extracted only for aesthetic reasons?".
by meindnoch 3y ago
I hate asking the question "is this function called from different places, or was it extracted only for aesthetic reasons?".
- corethree 3y agoThe function will/may get called from different places in the future. I am coding for the future.
- kaoD 3y agoAh, the good old premature abstraction. You're coding for a future that might not exist. You might be coding for the wrong future and you painted yourself into a corner. Been there, done that.
- corethree 3y agoBut what if I'm coding for the correct future? Maybe there's a way where I can code for every possible future with minimal effort. I'm talking about a pattern that isn't a form of premature optimization. Just a rule. Your way of coding is, coding for the most probable future. Distinctly different of coding for every possible future.
- mrkeen 3y ago>> The function will/may get called from different places in the future. I am coding for the future. > Ah, the good old premature abstraction. The function will get called from different places. Once from its caller, and a second time from its unit test.
- dllthomas 3y agoWould you hate it if it was really, really easy to answer?
- al05 3y agoFunctions have never been about simply being called different places. So you entire premise is wrong.