Repository navigation
README: span overloads, thread safety and a 3.x to 4.0 upgrade section - #14
Merged
Merged
Conversation
The README still showed the interface as it was before the span overloads, and said nothing about what a 4.0 upgrade changes for an existing user. The four behaviour changes are listed with the reason for each, the culture one first because it is the only one that can change what a program does without any compiler error. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What
IProtocolConverter<T>still showed the interface as it was before the span overloads.Prepare()is not, and a reused POCO instance belongs to one thread.Why the upgrade section matters
Four things behave differently in 4.0, and the first one can change what a program does with no compiler error at all:
MinValue = "-100.5"was read as -1005 on a German or French system. The range guard was wrong by a factor of ten, silently, and only on some machines.ProtocolConverterExceptioninstead of whatever the BCL happened to throw. Code catchingArgumentExceptionaround a conversion needs to change.IProtocolConverter<T>has two new members. Only affects hand written implementations and mocks.GuidrespectsUseBigEndianwhen writing. The reader always reversed, the writer ignored the flag, so a big endian Guid did not survive a round trip. Big endian Guid frames written by 3.x will now read differently. Little endian is unaffected.The section also lists what was fixed (thread safety,
decimal/sbyte, the minimum length check) and the measured speed up, with a pointer tobaseline-before-v4.mdfor how each number was obtained.The wire format itself did not change, which the byte exact golden vectors pin.
🤖 Generated with Claude Code