On Saturday, December 9, 2017 at 2:13:18 AM UTC, Mark Hamburg wrote:
>
> Functions get garbage collected. Otherwise think what would happen every 
> time you use partial function application or define a function within a let 
> or other nested context. Because those functions (can) capture values, they 
> are new values just as much as a list or record or other data value would 
> be.
>

Is this something that is specific to the way javascript works? In my 
experience partial function applications create a continuation, which is a 
stack frame holding the captured values. Once the function completes the 
stack frame is discarded, so there is no allocation or GC on the heap. Is 
this not how Elm would be implemented on webasm and managing its own memory?

-- 
You received this message because you are subscribed to the Google Groups "Elm 
Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to