This is the mail archive of the guile@cygnus.com mailing list for the guile project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: finite state machines in guile



On Thu, 1 Oct 1998, Tel wrote:

> What is wrong with implementing tail calls as `return(foo())' or something
> similar and letting the C compiler optimise them? Seems like doing something
> fancier than that is falling into the ``too smart by half'' category.

There's a C compiler that optimizes tail calls? Where? There is no
requirement in any standard that C prorams should be able to tail-call in
constant space, and I'm not sure if it's even possible with all ABIs..

And definitely not possible with debugging, you need to have the stack
frames in store. I wouldn't want to lose gdb backtraces 150 calls deep
anyway. :)

And this is of course just another point to prove that C can't be used
well as a portable assembler.. :(


Lauri Alanko
la@iki.fi