On Wed, 28 Aug 2024 at 08:12, Walter Bright via Digitalmars-d <digitalmars-d@puremagic.com> wrote:
On 8/26/2024 10:54 PM, Manu wrote:
> The whole point of ImportC, is to use the API.

Initially, yes. But the mission creep has already happened, and why not?

Where has it happened? The mission isn't even off the ground. I thought I'd have a go, and it's a complete non-starter.
So no, I really just want to use the C API; it's called ImportC; surely that's _literally the point_.


> And if someone does a binary-back-door... who cares? That's called a BUG.
> They're playing with fire already! C doesn't have any such type safety, and they
> shouldn't expect it to.
> They know what they did; they did it intentionally, surely knew what the risk
> factors were, and they are naturally expected to not write such bugs into their
> program.

The author of the C code likely has no idea that the caller from D exists let
alone that it would require that the C code not call any D functions.

The author of the library expects you to use the library via the API they provide... their API is C code; if C code is nothrow @nogc, then the callback you provide is necessarily nothrow and @nogc also.
I really can't see the fuss here...