memcpy, memset, memcmp and friends in the D Runtime

Mike none at none.com
Mon Apr 7 15:42:53 PDT 2014


On Monday, 7 April 2014 at 14:05:38 UTC, John Colvin wrote:
>
> What's this for then? 
> https://github.com/D-Programming-Language/druntime/blob/master/src/rt/memset.d

Those appear to be the implementations of the a[] = x syntax as 
compiler builtins and provide even more of a reason to it.  They 
are internal to the runtime.  I was wondering why such methods 
aren't part of the runtime's interface and I believe I received 
the answer.

I'm still wondering if the usage of memcpy in phobos could be 
replaced with something more 'D'. a[] = b[] could always be 
translated to a call to memcpy in the platform's runtime port.  
Maybe I'll do some tests and submit a pull request.


More information about the Digitalmars-d mailing list