On 2/26/15 3:12 PM, Johannes Pfau wrote:
Am Thu, 26 Feb 2015 14:53:16 -0800
schrieb Andrei Alexandrescu <[email protected]>:
On 2/26/15 2:39 PM, Johannes Pfau wrote:
Looks very nice, some things to refine:
"Any attributes are allowed on these methods."
* Should @safe and @trusted by disallowed as
"@safe code may not issue explicit calls to
opAddRef/opRelease"?
* Probably also add a note here that the functions must be inverse
and a note that they should be nothrow and/or final for performance.
OK. I don't want to impose many limitations - let users explore
possibilities. I added the recommendation.
Leaving the implementation of opAddRef/opRelease to the user really
opens some interesting possibilities. Wrapping manually
reference-counted C libraries is a rather obvious one but there are
probably more interesting cases.
Yah, this should dovetail real nice with allocators too.
Overall this proposal looks very nice :-)
Still looking for some sword to fall :o).
Andrei