3 ms·
.NET Spans (Bounded and Type-Safe Pointers)
- benaadams 10y agoFeatures: * Works with Generic types (rather than just primitives) * Unifies memory types: Stack allocated, Array (heap allocated), Unmanaged * Can pass fixed window over data (and slice to make window of window) * Can change read/write data to readonly data with ReadOnlySpan As Arrays are always read/write; which may mean a defensive copy if passing fixed data.