4 ms·
Why not give C# a try instead? It has everything you ask for and then some.
by neonsunset 2y ago
Why not give C# a try instead? It has everything you ask for and then some.
- neonsunset 2y agoWow, you all are sure mad enough to go out of your way and downvote my comments elsewhere. Stay in the swamp :)
- coldtea 2y agoBecause "some inconvenience/unmet requirement" from a language is not an invitation to "throw out the whole platform and your existing code and tooling, and learn/adopt/use an entirely different, single-vendor platform". Except if we're talking about some college student or hobbyist picking their first language and exploring the language space...
- imtringued 2y agoHe would still have to call out to the C++ function.
- neonsunset 2y agoAssuming it is "sort for 128bit records", that's something C# does really well - writing optimized code with structs / Vector128<T> / pointer arithmetic when really needed without going through FFI and having to maintain separate build step and project parts for a different platform. But even if it was needed, such records can be commonly represented by the same structs both at C#'s and C++'s sides without overhead. An array of such could be passed as is as a pointer, or vice versa - a buffer of struts allocated in C/C++ can be wrapped in a Span<Record128> and transparently interact with the rest of standard library without having to touch unsafe (aside from eventually freeing it, should that be necessary).