memcpy, memset, memcmp and friends in the D Runtime

Daniel Murphy yebbliesnospam at gmail.com
Wed Apr 9 05:56:43 PDT 2014


"monarch_dodra"  wrote in message 
news:pdzhmmnjxclrjtkgupoz at forum.dlang.org...

> I think arguably, there should be D equivalents of the C runtime 
> functions, if only for the added safety of slices (for example, memchr 
> could be 100% certifiably safe), and to avoid the rampant deduplication of 
> things as in the above, because of CTFE.

The utility of a 'slightly safer' layer between the C functions and the 
phobos range-based functions is questionable IMO.  eg in cases where memcpy 
on arrays is safe, phobos' copy would likely optimize to the exact same 
code. 



More information about the Digitalmars-d mailing list