[Issue 5125] Optional function purity/nothrowness

d-bugmail at puremagic.com d-bugmail at puremagic.com
Fri Mar 4 16:47:19 PST 2011


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


Jonathan M Davis <jmdavisProg at gmx.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jmdavisProg at gmx.com


--- Comment #3 from Jonathan M Davis <jmdavisProg at gmx.com> 2011-03-04 16:44:23 PST ---
I believe that Andrei's suggestion for pure was to add optional constraints to
pure. So, you'd have pure(condition) instead of pure, and the function would be
pure if the constraint was true. Presumably, we could do the same for nothrow
as well. @safe, @trusted, and @system (or at least @safe and @trusted) are in
the same boat. So, maybe it should just be generalized to all function
attributes (which would then presumably include stuff like public and private,
though that's pretty pointless other than avoiding special casing attributes
might be nice).

Regardless, we're going to need a solution for this if we want attributes like
pure to really work with templated functions.

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


More information about the Digitalmars-d-bugs mailing list