C standard libraries

Adam D. Ruppe destructionator at gmail.com
Tue Jul 2 05:13:25 PDT 2013


On Tuesday, 2 July 2013 at 06:33:03 UTC, CJS wrote:
> Thanks! I'm confused why that module isn't mentioned in the  
> library reference page.

I don't know.

> What's the difference between core.stdc and std.c?

std.c is what it was called in earlier versions of D, before 
there was a clear separation between phobos as the standard 
library (std.*) and druntime as the runtime library (core.*). 
Phobos is supposed to be 100% on top of druntime, so it is 
optional and interchangeable with ease.

The runtime, however, needed access to some C functions for its 
own implementation. Since it isn't allowed to depend on std.*, 
the C functions got moved into core.*.

The older std.c is kept around just for compatibility with the 
old names before the move, at least as far as I know. Maybe they 
haven't fully deprecated it though because there's other reasons 
I don't know about, since it has been many years now since the 
move.


More information about the Digitalmars-d-learn mailing list