Is there an existing issue for this?
Task description
In both J2N and ICU4N, we have migrated to C# 14.0.
C# 14.0 comes with 2 very important features:
- First-class span types allow
string to be intrinsically converted to ReadOnlySpan<char> without calling the (slower) .AsSpan() method. This will save us from having to add string overloads just for the sake of cross-target compilation.
- Extension members allow us to extend classes with static methods to polyfill methods on legacy target frameworks. For example, we can add
string.Concat() overloads that accept ReadOnlySpan<char>.
This is enough motivation for adding support ASAP, since it will drastically shape how we implement support for ReadOnlySpan<char>. Since we already build with the .NET 10 SDK (done in #1222), changing this should be straightforward, although there may be some cleanup required.
We should also do a sweep to ensure:
<LangVersion> is only defined at the solution level
- Any calls to
.AsSpan() that can be removed are removed
Is there an existing issue for this?
Task description
In both J2N and ICU4N, we have migrated to C# 14.0.
C# 14.0 comes with 2 very important features:
stringto be intrinsically converted toReadOnlySpan<char>without calling the (slower).AsSpan()method. This will save us from having to addstringoverloads just for the sake of cross-target compilation.string.Concat()overloads that acceptReadOnlySpan<char>.This is enough motivation for adding support ASAP, since it will drastically shape how we implement support for
ReadOnlySpan<char>. Since we already build with the .NET 10 SDK (done in #1222), changing this should be straightforward, although there may be some cleanup required.We should also do a sweep to ensure:
<LangVersion>is only defined at the solution level.AsSpan()that can be removed are removed