> I guess it is the same?

Correct.

> The question is more if the ref type of GC_unref() should matter for Nim 2.0. 
> Because people writing bindings have to care for this, and when the type 
> matters, then writing bindings may become harder.

The type does matter but it does allow for subtyping (C++ would call it a 
"virtual" call). If you have inheritance enabled, there is a runtime type 
descriptor with the "correct" destructor. If you don't have inheritance enabled 
you can still get lucky but it's a bad idea.

> But I assume that currently no one knows if GC_unref() will be available at 
> all for Nim 2.0.

`GC_unref` stays and Nim 2.0 is `nim c --gc:orc`.

> I can remember years ago when ARC had no name and we discussed the 
> Bacon/Dingle paper it was intended to fully remove GC_ref()/GC_unref() which 
> would have been a really serious problem for bindings.

The Bacon/Dingle thing is dead and won't come back but even with B/D the design 
did support refcounting. But it would have been more cumbersome to use.

Reply via email to