...In continuation of the post above and answering about :

> break ... implicit copy forever
> 
> The latter I'm thinking is a reference to the work being done on CPS. Can you 
> elaborate how that breaks the let/var distinction? I'm not super familiar 
> with the CPS transform, but I don't immediately see why it must break 
> anything inherently.

It depends on the kind of CPS. With CPS-CBV, you still have values, therefore, 
functions with state become values aka closures so you could model these 
functions with closures. A disaster for performance, so CPS-CBV is not 
feasible. But with CPS-CBN, we have "names" , in fact memory locations. Now, 
the environment gets a split between stateful and stateless functions, the 
latter being the outliers (they still use the stack) and the former will be 
grouped together. They will use a common basepointer and their parameters are 
fix memory addresses belonging to the environment - no locality anymore. These 
functions will now be called via goto and they return via direct or indirect 
goto. In fact, functions will dissolve completely, their function body survives 
as a chunk in a group of chunks only. With CPS-CBN, we change values for 
"names" , memory locations in fact. 

Reply via email to