v0.10.0
Lowered platform requirements and improved memory-safety.
GitHub (v0.9.0...v0.10.0)
- #71 Endianness sensitive collection
- #70 Remove static indices
- #68 Lower platform requirements
- #67 Rework
uninitialized(_:)
- #65 [U]Int until StaticBigInt
- #62 StaticString until StaticBigInt
New in Numberick
.iOS(.v14), // from 16.4
.macCatalyst(.v14), // from 16.4
.macOS(.v11), // from 13.3
.tvOS(.v14), // from 16.4
.watchOS(.v7), // from 9.4
New in NBKCoreKit
You don't want to know how difficult it was to come up with a decent alternative to initialized junk.
/// A collection that iterates forwards or backwards depending on the platform.
///
/// It iterates front-to-back on little-endian platforms, and back-to-front otherwise.
///
/// ```swift
/// let value = Int256.uninitialized { words in
/// for index in words.indices {
/// words.base.initializeElement(at: words.baseIndex(index), to: UInt.zero)
/// }
/// }
/// ```
///
public struct NBKLittleEndianOrdered<Base>: RandomAccessCollection where Base: RandomAccessCollection { }
New in NBKDoubleWidthKit
New (default) literal types because StaticBigInt does not back-deploy.
+ literal: Digit (by default)
+ literal: StaticString (by default)
- literal: StaticBigInt (by default)
It was made clear on the Swift forums that you may not access uninitialized memory (see: comment).
- public static func uninitialized(_ body: (inout Self) -> Void) -> Self {
+ public static func uninitialized(_ body: (NBKLittleEndianOrdered<UnsafeMutableBufferPointer<UInt>>) -> Void) -> Self