This repository was archived by the owner on Aug 5, 2024. It is now read-only.
Move away from LinkedList #48
Closed
Add this suggestion to a batch that can be applied as a single commit. This suggestion is invalid because no changes were made to the code. Suggestions cannot be applied while the pull request is closed. Suggestions cannot be applied while viewing a subset of changes. Only one suggestion per line can be applied in a batch. Add this suggestion to a batch that can be applied as a single commit. Applying suggestions on deleted lines is not supported. You must change the existing code in this line in order to create a valid suggestion. Outdated suggestions cannot be applied. This suggestion has been applied or marked resolved. Suggestions cannot be applied from pending reviews. Suggestions cannot be applied on multi-line comments. Suggestions cannot be applied while the pull request is queued to merge. Suggestion cannot be applied right now. Please check back later.
I took a first pass at #21, making the minimum changes necessary to avoid
LinkedList. This is a breaking change, which I know isn't likely to be acceptable, but this change seems like a good point to start the conversation from.As mentioned on the bug we could
@Deprecatethe existing methods and introduce new ones (e.g.public List<Diff> diff_main_2(String text1, String text2)or whatever naming scheme we'd like), however one bigger wrinkle is thepublic LinkedList<Diff> diffsfield onPatch. Since it's public we can't safely migrate the field toList; though we could similarly deprecate it and introduce adiffs2(or whatever) field.What are your thoughts? I do believe this is worth doing, as it's a somewhat expensive class to force people to use, but it may be fairly crufty to leave in a bunch of deprecated
LinkedListusages everywhere. Is there any room for a breaking change? As a Java user this is the sort of breakage I'd appreciate, personally.