digitalmars.D - associative and commutative properties for functions
- Ilya Yaroshenko (6/6) Jan 19 2014 Rationale:
- bearophile (10/14) Jan 19 2014 @associative and @commutative are useful and quite nice, but the
Rationale: More CTFE magic with UFCS and operator overlaoding. Related links: http://forum.dlang.org/thread/ibhug0$3065$1 digitalmars.com?page=2#post-ibjt80:2418oc:241:40digitalmars.com Best Regars, Ilya
Jan 19 2014
Ilya Yaroshenko:Rationale: More CTFE magic with UFCS and operator overlaoding. Related links: http://forum.dlang.org/thread/ibhug0$3065$1 digitalmars.com?page=2#post-ibjt80:2418oc:241:40digitalmars.comassociative and commutative are useful and quite nice, but the D compiler is not smart enough to verify that a function has those properties. In general the D design tries to avoid unverifiable attributes. C++ programmers will probably have a way to express (unverified) properties like associative using a new syntax (this page is not very updated): http://en.wikipedia.org/wiki/Concepts_%28C%2B%2B%29#Axioms Bye, bearophile
Jan 19 2014