Currently BackrollSession.SyncInputs uses a C-like interface of a mutable void* and a buffer length. This presents several issues:
It requires an unsafe interface.
It's not type safe.
Inexperienced programmers may easily lead to buffer overflow if mishandled.
It's unusual for a good number of C# developers.
Instead of using a buffer + length, we could use a type safe generic function instead that returns a ReadOnlySpan of the inputs, which would resolve all of the above issues.
Currently BackrollSession.SyncInputs uses a C-like interface of a mutable void* and a buffer length. This presents several issues:
Instead of using a buffer + length, we could use a type safe generic function instead that returns a ReadOnlySpan of the inputs, which would resolve all of the above issues.