NightOwl888 commented on code in PR #1018: URL: https://github.com/apache/lucenenet/pull/1018#discussion_r1844286471
########## src/Lucene.Net.Tests/Analysis/TokenAttributes/TestCharTermAttributeImpl.cs: ########## @@ -230,9 +230,7 @@ public virtual void TestAppendableInterface() t.Append((ICharSequence)t2, 1, 5 - 1); // LUCENENET: Corrected 3rd parameter Review Comment: > Or that we should add ISpanAppendable to the types in Lucene.NET that implement IAppendable? Yes. Ideally, we would have an optimized implementation for all of them and this is required prior to implementing `ReadOnlySpan<char>` as a character sequence throughout the rest of the project. Lucene.NET only has 3 implementations of `IAppendable`: - `CharBlockArray` - `CharTermAttribute` (note that the `ICharTermAttribute` should inherit `ISpanAppendable`) - `OpenStringBuilder` (`ISpanAppendable` already implemented, will be replaced with `J2N.Text.StringBuilder`) Here is another example of how `ISpanAppendable` is implemented: - https://github.com/NightOwl888/ICU4N/blob/7ac8a713722197f4a4364772d9d1cc025f1a879b/src/ICU4N/Support/Text/OpenStringBuilder.Appendable.cs#L111 - https://github.com/NightOwl888/ICU4N/blob/7ac8a713722197f4a4364772d9d1cc025f1a879b/src/ICU4N/Support/Text/OpenStringBuilder.Appendable.cs#L14-L25 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: dev-unsubscr...@lucenenet.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org