Closed qmfrederik closed 6 years ago
I think it should be done as follows:
This way we don’t break compatibility as soon, and yet we don’t have to maintain two code paths.
Can you modify your PRs to conditionally use span<> and deprecate the methods they substitute?
@claunia I've been able to update the PR so that the only version for which support is dropped, is .NET Framework 4.0. .NET 4.5 is still supported.
.NET 4.5 was released in 2012 and most machines will now have it via Windows Update.
Adding support for Span
Is it OK for you to drop support for .NET 4.0 or is there a specific reason you want to keep it?
Oh, one more thing - I've added overloads which take ReadOnlySpan<byte>
as parameters but kept the old ones which take byte[]
. So there should be no build errors if you upgrade to a new version of plist-cil.
The Travis build failure is because of a Travis infrastructure.
We're doing a performance review of our application and are trying to make sure of the new
Span<byte>
andReadOnlySpan<byte>
types which are new in .NET land.For plist-cil, working with
Span<byte>
opens a lot of opportunities:byte[]
array (e.g. starting at index 10 and a length of 42), without having to copy that subset to a new array (which has a performance impact)This PR adds support for reading property lists form those types to plist-cil.
It comes with a couple of drawbacks, though. That includes:
netstandard1.x
andnetcoreapp1.x
). It appears there's a big push to get everyone to use at leastnetstandard2.0
, so that should be OKSupporting .NET Framework without adding a dependency on System.Memory and still adding support for
Span<byte>
would mean duplicating a lot of code, and I'm not sure it's worth it.Would this be a problem for you?