Documentation re -betterC compatibility with standard library functions

Jonathan M Davis newsgroup.d at jmdavisprog.com
Tue Jan 28 20:09:44 UTC 2025


On Tuesday, January 28, 2025 10:41:31 AM MST DLearner via Digitalmars-d-learn wrote:
> On Tuesday, 28 January 2025 at 15:00:13 UTC, Jonathan M Davis
> wrote:
> [...]
>
> >
> > -betterC was originally intended to be a tool for making it
> > easier to port C code to D code (after which, the idea was that
> > -betterC would no longer be used, and you would just have a
> > normal D program).
>
> [...]
> > - Jonathan M Davis
>
> I thought a further goal of -betterC was to ease D's use in
> adding further features to existing C programs, by making the
> linkage effort small.
>
> Certainly (though only as a near-trivial hobbyist) I have used
> -betterC in that way.

You can use it however you like, and folks have found a variety of uses for
it. However, it's a restricted subset of the language that we're not going
to support with the standard library precisely because it is so restricted,
and the standard library is intended for use with normal D.

- Jonathan M Davis





More information about the Digitalmars-d-learn mailing list