@associative and @commutative properties for functions
bearophile
bearophileHUGS at lycos.com
Sun Jan 19 05:55:59 PST 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.com
@associative 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
More information about the Digitalmars-d
mailing list