On Wednesday, February 11, 2015, Keean Schupke <[email protected]> wrote:
> def add_x x = lambda y = x + y
> x : 'a -> ('a -> 'a)
>
> def add_one = add_x 1
>
> I don't see the problem. "add_one" is a stack allocated object in the top
> level context.
>
Umm... The stack in this context is gone by the time we enter main. I'm not
quite sure what you are imagining, but I'm sure it will be educational.😄
Given dynamic libraries and multiple application entry points (as opposed
to just main), putting top-level allocations on the stack is tricky.
I do agree that in this case the closure object can be allocated as a
global, though.
Jonathan
_______________________________________________
bitc-dev mailing list
[email protected]
http://www.coyotos.org/mailman/listinfo/bitc-dev