I'm working on a new library where some procs are likely to indirectly call each other right before they return. Is this tail recursion optimized in DM?
Alternatively, I could set waitfor to 0, assign a value to ., and then make my last proc call. It looks like that's the sort of thing that waitfor was made for.
I just don't want to resort to using an undocumented feature if BYOND handles the situation fine without it.
ID:165715
Nov 11 2006, 2:29 am
|
|
DM automatically optimizes nothing.
Possibly, but usually spawn() works best. The waitfor example can easily be rewritten with spawn().
Lummox JR