2 ms·
In programming, never make an assumption that something is "easy." https://news.ycombinator.com/item?id=35701181 https://news.ycombinator.com/item?id=35701181
by gwbas1c 4y ago
In programming, never make an assumption that something is "easy."
https://news.ycombinator.com/item?id=35701181 https://news.ycombinator.com/item?id=35701181 did just that and explained the results.
Personally, I find PInvoke time consuming; and often time a lot of people screw it up.
I'm not sure how I'd translate things like lifetimes and ownership into C#: The language just doesn't have those concepts.
Lifetimes might make sense as IDisposable, but that could get tedious. I'd be tempted for types that are just "memory" to have finalizers.
Ownership may require some kind of locking wrapper.