alias to a property as an argument to a mixin template
comco
void.unsigned at gmail.com
Mon Sep 24 05:58:48 PDT 2012
On Monday, 24 September 2012 at 11:39:08 UTC, monarch_dodra wrote:
> Oh. I think I just got what your "reassign" was meant to do. I
> think I see it now. I guess it does work nice actually.
>
> I'd say that unfortunately, your *new* reassign is making the
> assumption that it is possible to grab a reference of the
> passed in objects. It will fail with "write properties", that
> need to evaluate different functions depending on read context
> and write context:
...
> The problem with this approach though, is that it only works
> once per scope... and really, it is not much more than a
> glorified macro.
That's exactly the point :) - the `unfortunate` assumption about
the references keeps this functionality nice and usable, and
anything beyond that would just be too bit of a clumsy glorified
macro, not worth the effort using it.
More information about the Digitalmars-d-learn
mailing list