memcpy, memset, memcmp and friends in the D Runtime

Mike none at none.com
Wed Apr 9 06:10:15 PDT 2014


On Wednesday, 9 April 2014 at 12:50:23 UTC, Daniel Murphy wrote:
>> * Were these methods intentionally omitted from the D Runtime, 
>> or just taken for granted since they were so conveniently 
>> available in the C standard library?
>
> They were _not_ omitted from druntime, they were exposed though 
> core.stdc. (and other places before that)
> An implementation in druntime was not necessary because all 
> platforms druntime targets provide a c runtime.
>
>> * Should they be added to core.memory or some other module and 
>> exposed as official, supported, methods of the D Runtime 
>> (hopefully changing their names)?
>
> No, they are already exposed via core.stdc.
>

Thank you for your thoughtful answer (although I'm not ready to 
accept it just yet :-)

Let me ask you this:  From a principled D design point of view, 
is core.stdc an interface only for ports with a C library, an 
implementation detail of the current druntime that phobos is 
circumventing, or an official, supported interface that all 
complying ports must implement?

If the latter, why is it non-existing in the library reference?


More information about the Digitalmars-d mailing list