Dynamically binding to D code using extern(D)
Hipreme
msnmancini at hotmail.com
Thu Sep 30 23:48:31 UTC 2021
Okay, I do agree with you that I may have exaggerated with
absolute intuitiveness, but I was talking about that
intuitiveness for loading a symbol from a shared library.
> You're limited to using C's types
- I think I don't understood what you meant with that, if the
data type is known before head, it is possible to just declare it
from the other side
On Thursday, 30 September 2021 at 22:30:30 UTC, jfondren wrote:
> - you can't use overloading, lazy parameters, default values;
> you can't rely on scope parameters, etc., etc.
- That seems to be pretty much more a problem for dynamically
loading a function, although default values can be mirrored to in
D API.
> - you can't casually hand over GC-allocated data and expect the
> other side to handle it right, or structs with lifetime
> functions that you expect to be called
- That is another problem that doesn't seem related to the
external linkage too, handling GC-allocated data with extern(D)
doesn't stop it from it being garbage collected, I'm fixing that
kind of error right now again.
> separate applications and some form of interprocess
> communication (pipes, unix sockets, TCP sockets) instead of
> function calls.
- I'm pretty interested in how to make that thing work, but I
think that would change a lot in how I'm designing my code, and
with that way, it would probably become absolutely data oriented,
right?
More information about the Digitalmars-d-learn
mailing list