Fake real-time blog from XML 2006: day one...some more
by Rick Jelliffe
Here is more of the fake coverage of the XML 2006 conference. Like Groundhog Day, we get to start from day one again and do it differently now that some more papers are up.
Otiose. Nice. I haven't seen that word used in a long time.
But all tail recursive functions can be *easily* transformed into iterative functions, right?
Or am I missing something here?
Yes, that is the optimization. Java JVM implementations don't necessarily do it. My programmers have to deal with processing text documents of 10s of Megs in size: if you imagine the worst case of one stack frame per character, you can see why it is prudent to favour loops over recursion!
Some IDEs can do the transformation automatically. However, why program in one idiom then maintain in another?
For Java people who are lost, look up "tail call" in
I would tend to agree with
But it is not necessarily easy to implement. See http://saxonica.blogharbor.com/blog/_archives/2006/8/1/2187040.html
Finally, some issues with tail recursion and Java are old ones: life in 2007 may be different that life in 2001 which would be great: