[Developers] return_arrays_increment();

Arni Magnusson arnima at hafro.is
Tue Sep 15 10:55:39 PDT 2009


> The right way would be
>
> if (A)
> {
>   RETURN_ARRAYS_DECREMENT();
>   return X;
> }
>
> It migth be possible to turn FUNCTIONS into function objects (maybe that 
> is what they call functors (not to be confused with category theory)) 
> and overload the function call to call RETURN_ARRAYS_INCREMENT(); and 
> RETURN_ARRAYS_DECREMENT(); at the beginning and end.

I guess the conclusion is that hiding the return_arrays from the user is 
not trivial. You understand this stuff better than anyone else, so if 
Johnoel adds the danger of user mistakes with return_arrays to the list of 
issues, then at least we have a suggested solution in the long term.

Thanks,

Arni


More information about the Developers mailing list