[Issue 11092] @commutative annotation for commutative functions
    d-bugmail at puremagic.com 
    d-bugmail at puremagic.com
       
    Sun Sep 22 04:22:48 PDT 2013
    
    
  
http://d.puremagic.com/issues/show_bug.cgi?id=11092
bearophile_hugs at eml.cc changed:
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |bearophile_hugs at eml.cc
--- Comment #1 from bearophile_hugs at eml.cc 2013-09-22 04:22:47 PDT ---
(In reply to comment #0)
> The title should be self-expressive,
This is an enhancement request, so the title is never self-expressive:
- What are some use cases?
- What are the limits?
- Do you mean just functions with two arguments?
- What if one, the other or both arguments have a default value?
- What about testing. QuickCheck-like tools for D would enjoy to know what
functions are annotated with such @commutative, to test at run-time they are
actually commutative. For this std.traits.functionAttributes will need to take
into account @commutative functions too.
More notes:
- std.functional.memoize could detect a @commutative function and sometimes
reduce the memory usage of its associative array.
-- 
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