On 19-nov-10, at 08:44, Walter Bright wrote:

Fawzi Mohamed wrote:
I don't find a valid D1 expression to put in place of scope, or to somehow hide it, i.e. how do you write something like
module t;
void f(scope void delegate() action){
   action();
}
void main(){
   f(scope delegate(){
       printf("bla\n");
   });
}
so that it is valid D1 and D2?

Just remove the 'scope'.
removing scope causes heap allocation in D2 that I want to avoid.
Still maybe you are right, I will use /+scope+/, so that one has something working, and easily go to the efficient D2 version

Reply via email to