memcpy() comparison: C, Rust, and D

deadalnix via Digitalmars-d digitalmars-d at puremagic.com
Tue Jan 31 15:50:18 PST 2017


On Tuesday, 31 January 2017 at 23:42:43 UTC, Walter Bright wrote:
> On 1/31/2017 11:32 AM, Nordlöw wrote:
>> On Tuesday, 31 January 2017 at 19:26:51 UTC, Walter Bright 
>> wrote:
>>> This "as if" thing enables the designer of a function API to 
>>> set the desired
>>> relationships even if the implementation is doing some 
>>> deviated preversion
>>> with the data (i.e. a ref counted object).
>>
>> Why is this feature used? Optimizations? Safety?
>
> So ref counted containers can be built.

As long as they don't use a tree or any other datastructure that 
require more than one level of indirection internally.


More information about the Digitalmars-d mailing list