On Mon, 09 Jan 2012 09:27:06 -0500, bearophile <bearophileh...@lycos.com>
wrote:
Steven Schveighoffer:
With new => syntax (in git head), this would probably be:
@property ref tile => map[y*w+x];
That's not currently supported:
http://d.puremagic.com/issues/show_bug.cgi?id=7176
The given function is not a method, but it is an inner-class function.
But you are right, it's a named function not a lambda. I'm not too
concerned about whether this version works or not, the other version is
reasonably short.
I wonder if this would work, but it wouldn't be inlined like my original
example:
auto tile = @property ref () => map[y*w+x];
-Steve