http://d.puremagic.com/issues/show_bug.cgi?id=9656


yebblies <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |[email protected]
         Resolution|                            |FIXED


--- Comment #7 from yebblies <[email protected]> 2013-05-10 22:54:50 EST ---
> I am ignorant regarding the compiler, but ,aybe in the meantime it's enough to
> have an invisible "unique" attribute used just by the compiler-front end, like
> the various PUREimpure, PUREfwdref, etc used in the compiler.

So far we've been going in the direction of 'unique expressions' whereby the
fact they allocate new memory or call pure functions etc is enough to ensure
they are unique.

The funny thing about this one is that this function:

int[] dup(const(int)[] data) pure
{
    return data.dup;
}

was already creating a unique result, while the builtin was not.  (I haven't
tested that exact code, but something along those lines should work)

The purity+allocation pattern for normal functions should allow many library
types to create unique data, without needing additional attributes.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------

Reply via email to