Am Fri, 10 Aug 2012 15:56:53 +0200
schrieb Timon Gehr <timon.g...@gmx.ch>:

> int eval(scope Expr* e){
>      final switch(e.tag) with(Expr.Tag){
>          case val:   return e.i;
>          case plus:  return eval(e.a) + eval(e.b);
>          case minus: return eval(e.a) - eval(e.b);
>      }
> }

Can you quickly explain the use of scope here? Does that mean "I wont keep a 
reference to e"?
What are the implications? Does scope change the method signature? Does the 
compiler enforce something? Will generated code differ? Does it prevent bugs or 
is it documentation for the user of the function?
Thanks in advance for some insight!

-- 
Marco

Reply via email to