3 ms·
When is it better to solve those problems through the organization of your code rather than an autocomplete feature? The things you mentioned all seem to yield
by zomglings 6y ago
When is it better to solve those problems through the organization of your code rather than an autocomplete feature?
The things you mentioned all seem to yield to the decorator pattern.
Creating the right abstraction (instead of using autocomplete) would benefit future collaborators who may not have access to the same autocomplete functionality.
- akiselev 6y agoThe GP wanted to repeat some code modification 2-6 times. At that scale, adding abstractions often just adds unnecessary indirection and makes the code harder to read.
- zomglings 6y agoDepends on how often they intend to make changes to that code. But in general I think you are right.
- aerovistae 6y agoEven if that was true, which I'm not arguing one way or the other, it wouldn't take much effort of imagination to come up with other use cases that aren't solved by decorators. This has a taste of the old "they would have asked for a faster horse" argument.
- zomglings 6y agoI actually agree with you. I wasn't implying that the OP should consider refactoring their code. Just trying to understand for myself when I would prefer autocomplete over organization of code.