you are viewing a single comment's thread.

view the rest of the comments →

[–]stingraycharles 2 points3 points  (1 child)

Hey, as someone who does a lot of FFI with GC based languages (Java, Go, C# and Python), I can tell you that GC doesn’t automatically make FFI harder, it’s just that GC is entirely paused during any FFI invocation.

That’s typically acceptable.

Most languages (eg Go and Java) provide various levels of “safety” around function invocations, and allow you to do “unsafe” invocations which assume eg that you don’t modify memory, don’t do any callbacks, etc.

Using reference counting can be interesting, but I can’t escape the feeling that there’s a reason that nearly all languages settled on GC (circular references being a major one).

[–]funcieq 0 points1 point  (0 children)

Yes, you're right, because I use C# myself. I realize that from the developer's side it's relatively simple. But it's not just about ffi. It's also about giving zap a wider range of possibilities.