News for hackers. Stuff that matters.
Re:Show HN: My Go SQLite driver did poorly on a benchmark, s... by neonsunset on Friday December 15, 2023 @01:42PM (#38657139)
Nothing ever comes close to P/Invoke in ease of use* (while remaining practically zero-overhead if you don't need to marshal strings). JNI is on the opposite side of the spectrum and should never be even compared as it is at least ten times worse developer experiences (and equally higher overhead).

*in garbage-collected languages, otherwise it's pretty much like calling C from Rust.

Re:Show HN: My Go SQLite driver did poorly on a benchmark, s... by ncruces on Friday December 15, 2023 @02:03PM (#38657388)
I'm sorry. The debugging experience of trying to whip up PInvoke wrappers for the COM library for Kinect 2 that worked with Unity Engine's awful version of Mono was charring.

Also had “fun” building some Xamarin Android PInvoke-to-JNI bindings. I just died a little bit remembering this.

Re:Show HN: My Go SQLite driver did poorly on a benchmark, s... by neonsunset on Friday December 15, 2023 @02:06PM (#38657430)
No language has good interop story with Android unless there's no interop and you are using Java/Kotlin.

As for the first argument - this really does not represent the average experience in the current day ecosystem. Kinect 2 was a thing 9 years ago and together with Unity it's pretty much an exotic scenario. Unity in general is really not a good example until they get Unity 6 out and move over to vanilla .NET.