DEV Community

Discussion on: Jawbone: a new game dev library for .NET 5

Collapse
 
thebuzzsaw profile image
Kelly Brown • Edited

Well, there's the primary benefits: I can avoid making copies of arrays, and I am spared the burden of passing startIndex and length everywhere. The secondary benefit is huge in game dev: a span can reference managed or unmanaged memory! So, regardless of whether the underlying data came from a new byte[...] in C# or a malloc in C (common in my native libraries like SQLite), I can write nice clean C# code to interact with it.