Conversation
|
👎 I don't see why this refactor is required or the benefits it provides |
|
@fjy it protects the codebase from introducing suboptimal code due to inattention or ignorance. It seems to me that there are no such cases in the codebase right now (all places where LinkedList is removed seem to not be important for efficiency), but this is a lucky accident. Many refactorings are not required but they make supporting the codebase easier. |
|
@fjy could you please respond |
|
@fjy is your 👎 emoji intended as a "veto" in the ASF sense (https://www.apache.org/foundation/voting.html)?
If so, please lay out the technical justification as to why you are vetoing this change. If not, please make it clear that you did not actually intend to veto, and this change can go forward if someone else +1s it. |
|
I'll change my vote to 0-. I'm not going veto the PR but I also see almost no benefit in it either. |
|
@jon-wei thanks |
|
@leventov Sometime we may want to both operate on |
|
@SEKIRO-J the thing is, iterating on the linked list is expensive because it's iterating through pointers. Even though the time complexity of remove() is O(1), iteration is the most popular operation for the list. I think prohibiting using LinkedList by default is to make you sure that you really need to use it and what is the benefit of using it. |
|
@jihoonson gotcha |
All use cases for LinkedList are covered by ArrayList and ArrayDeque, which are better options.