On Wednesday, 27 November 2013 at 11:20:59 UTC, Joseph Rushton
Wakeling wrote:
On 27/11/13 12:14, monarch_dodra wrote:
Interesting trick. That said, doing this (should) also mean
you can't use foo in
a pure context, since it means the caller needs to access the
global dummy
(although that seems to work right now).
Should be OK in a struct/class method context, if dummy is an
internal variable.
That wouldn't work, because you'd need "this" to refer said dummy
variable. Even if it worked, you'd bloat all instances of your
struct/class just for dummy data :/