RFC: std.uuid

Vladimir Panteleev vladimir at thecybershadow.net
Sat Dec 24 17:02:38 PST 2011


On Saturday, 24 December 2011 at 00:31:43 UTC, Piotr Szturmaj 
wrote:
> Jonathan M Davis wrote:
>> On Friday, December 23, 2011 23:09:32 Piotr Szturmaj wrote:
>>> Johannes Pfau wrote:
>>>> Related question to the SHA/MD5 hash functions: could those 
>>>> be pure?
>>>
>>> Weakly pure, yes - but for what?
>>
>> In general, if a function _can_ be pure, it _should_ be pure. 
>> If it can be and
>> it isn't, it artificially restricts the types of functions 
>> which can call it.
>
> Yes, Johannes probably want to mark uuid hash gen as pure. I 
> just wanted to know if its something important as my code used 
> memcpy which is impure.

Where does your code use memcpy? I see one mention in the 
comments, but none in the code.

Anyway, I believe you can do without memcpy by using array copy? 
Array copy might even be faster, since memcpy is not a DMD 
compiler intrinsic like in many C/C++ compilers.


More information about the Digitalmars-d mailing list