Skip to content

v1.0.18-alpha

Pre-release
Pre-release
Compare
Choose a tag to compare
@ZacharyPatten ZacharyPatten released this 19 Sep 19:57

Nuget Package
New Features:

  • 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<...> or IFunc<...> 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<...> or Func<...> 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<...> or FuncRuntime<...> 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>.