Necessity of D Library (and/or Core Library)

Rikki Cattermole via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Sat May 23 01:44:42 PDT 2015


On 23/05/2015 6:35 p.m., Anthony Monterrosa wrote:
>      Does D require the standard library to function? Or to be more
> direct, does D as a language need its library, or core library, to
> function correctly?
>
>      I have become very interested in how programming languages do their
> magic; how they interact with the computer itself, and their inner
> mechanics. This eventually led me to resources that said the line
> between a language and its library differs between languages, and I was
> wondering where D stood on that line.
>
>      Note: since, I'm already here, does anyone know how D
> manipulates/uses standard streams to make its write/read functions as
> well? I can't find any resources telling me a non-abstracted way of this
> being completed.
>
> P.S. I'm only a freshman computer science student, so if some of this
> should be basic, I simply don't know it yet.
>
> Thanks in advance!

D can function without any form of standard library or runtime on e.g. 
embedded devices. But it will be next to useless without druntime.

Druntime atleast in master requires libc. Libc defines things such as 
malloc and free. As well as other required functions to interact with 
the OS with. Although OS libs such as user32 on windows is used. It also 
provides the GC.

But phobos itself is not required in any sense for D to work. It's just 
library code that comes with it.


More information about the Digitalmars-d-learn mailing list