[D2] How to not full closure?
bearophile
bearophileHUGS at lycos.com
Sun Jul 27 11:09:52 PDT 2008
Bruno Medeiros:
> I think Walter's solution ("using 'scope' to tag function parameters
> that do not escape") may be even better. It doesn't add new syntax to
> literals, is statically verifiable more "locally", and may have other
> uses other than for delegates.
So to pass a lambda without closure you have to write something like this?
foo(scope (int x){return x*x;});
Bye,
bearophile
More information about the Digitalmars-d
mailing list