Stack consumption.

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Stack consumption.

sledorze
When thinking about using continuations; I realized that something fundamentally requiered is the ability to not consume the stack as you call continuations all over the place.

This means that, as the targetted architecture do not offer tail call optimization; there's a need for an alternative solution first; trampoline transformation (applicable with certain use cases).

for those interested; a very good explanation here in he context of another limited plateform (JVM) for scala:

http://blog.richdougherty.com/2009/04/tail-calls-tailrec-and-trampolines.html

My 2 cents..
Stephane
Reply | Threaded
Open this post in threaded view
|

Re: Stack consumption.

sledorze
So, I've made some tests and found out that there's no problem with stack consumption in my gui (I use continuations for my logic, it's easier to write / read).

I just realized that this is because I go through the event system, which acts like a trampoline! (indeed).

And this also applies to nodeJs with all the events it is based on..

So, in the end; everything is beautiful under the sun... happy hacking!!! :)