[MLton] it is necessary to manually make things tail-recursive?
skaller
skaller@users.sourceforge.net
Fri, 07 Jul 2006 07:24:45 +1000
Just a red herring .. but in a purely functional language (which doesn't
include ML ..) it isn't clear there's any benefit from tail rec.
Reusing a stack frame 'under the covers' turns out to be a serious
problem in a multiprocessing environment because it interferes
with parallel garbage collection.
At best you can avoid storing inner return addresses.
It turns out you can also do this in some non-tail recursive
routines.
--
John Skaller <skaller at users dot sf dot net>
Felix, successor to C++: http://felix.sf.net