D as a Better C
Moritz Maxeiner via Digitalmars-d-announce
digitalmars-d-announce at puremagic.com
Wed Aug 23 07:34:23 PDT 2017
On Wednesday, 23 August 2017 at 14:00:34 UTC, Walter Bright wrote:
> On 8/23/2017 6:28 AM, Moritz Maxeiner wrote:
>>
>> I've been mixing C and full D for a while now (on Linux) by
>> either having the main C program call rt_init/rt_term directly
>> (if druntime is linked in when building a mixed C/D
>> application), or have Runtime.initialize/Runtime.terminate be
>> called from D via some plugin_load/plugin_unload functionality
>> when using D shared libraries.
>> Why is this not considered practical?
>
> Because in order to add a D function as trivial as:
>
> int foo() { return 3; }
>
> to a C program, now the C program has to link to druntime, and
> the program no longer has a small footprint. One of the reasons
> people use C is to get that small footprint. This has been a
> large barrier to C programs making use of D.
Thank you, are there other factors involved, or is it only
impractical for people who require minimal application size /
memory footprint, then?
More information about the Digitalmars-d-announce
mailing list