Releases: ZacharyPatten/Towel
Releases · ZacharyPatten/Towel
v1.0.20-alpha
Update target to .NET 5 (from .NET Core 3.1)
Enabled Nullable Reference Types (still a work in progress though)
New Features:
IsOrdered
FilterOrdered
SortCycle
SortPancake
(Span overload only)SortStooge
(Span overload only)TryParseRomanNumeral
Maximum
(Span overload)Minimum
(Span overload)Range
(Span overload)
v1.0.19-alpha
New Features:
IsPalindrome
IsInterleaved
(Recursive + Iterative) [ReadOnlySpanSpan]
Fixes:
TagAttribute
supportsnull
now
Changes:
TryParse
signatures have been changed from[bool TryParse<T>(string @string, out T value)]
to[(bool Success, T Value) TryParse<T>(string @string)]
to help promote structural vs nominal typing. The out parameters require custom delegates while returning a(bool, success)
fits into the standardFunc<string, (bool, T)>
pattern.ValueAttribute
renamed toTagAttribute
v1.0.18-alpha
- Hamming Distance
- Liechtenstein Distance
- Binary Search (added
ReadOnlySpan<T>
overload) - Permute (added
Span<T>
overload) - Sorting Algorithms (added
Span<T>
overloads) - ValueAttribute (a value-based attribute)
There were some major design changes to push for structural typing rather than nominal typing.
- Remove unnecessary interfaces types that forced nominal typing rather than structural typing. Rather than using these types, it is better to always use the relative
IAction<...>
orIFunc<...>
types.IGetIndex<T>
->IFunc<int, T>
ISetIndex<T>
->IAction<int, T>
ICompare<T>
->IFunc<T, T, CompareResult>
IEquate<T>
->IFunc<T, T, bool>
ISift<T>
->IFunc<T, CompareResult>
IHash<T>
->IFunc<T, int>
IStep<T>
->IAction<T>
IStepBreak<T>
->IFunc<T, StepStatus>
- Removed unnecessary delegate types that forced nominal typing rather than structural typing. Rather than using these types, it is better to always use the relative
Action<...>
orFunc<...>
types.Equate<T>
->Func<T, T, bool>
Equate<A, B>
->Func<A, B, bool>
Compare<T>
->Func<T, T, CompareResult>
Compare<A, B>
->Func<A, B, CompareResult>
Sift<T>
->Func<T, CompareResult>
GetIndex<T>
->Func<int, T>
SetIndex<T>
->Action<int, T>
TryParse<T>
->FuncO1<string, T, bool>
- Removed unnecessary struct types that forced nominal typing rather than structural typing. Rather than using these types, it is better to always use the relative
ActionRuntime<...>
orFuncRuntime<...>
types.SiftRuntime<T>
->FuncRuntime<T, CompareResult>
CompareRuntime<T>
->FuncRuntime<T, T, CompareResult>
PredicateRuntime<T>
->FuncRuntime<T, bool>
GetIndexRuntime<T>
->FuncRuntime<int, T>
SetIndexRuntime<T>
->ActionRuntime<int, T>
HashRuntime<T>
->FuncRuntime<T, int>
- Multiple methods and static classes were also removed or renamed.
There were also some changes to method overloads to promote using Span<T>
and ReadOnlySpan<T>
.