Re: mirage + froc = self-scaling?

Le mardi, 9 avril 2013 à 23:50, Daniel Bünzli a écrit :
> Unless I'm mistaken it is essentially going to be a trivial rewrite of that weak.js file with WeakMap to get the correct weak semantics. You will however have to bet on ecmascript 6's eventual adoption.

It turns out that I am mistaken.  

WeakMap has weak *keys*, keys must be objects and there's no way to enumerate the keys of a map. These properties allow for a very simple implementation with the help of private symbols [1]. You can even implement it in the current javascript though you cannot guarantee that someone won't fiddle with your private field.  

But these very weak properties don't seem to allow to implement a weak reference (and hence weak arrays).  

However it may be possible to prevent the leaks by simply introducing a function in react that enables some kind of manual management that would need to be done only at the leaves (output) of the dag --- this would be similar to what is mentioned here ([2], last paragraph) about the implementation of pec, but without its implementation cost [3] as we still have the forward pointers. But I have to think a little bit more about this.




This archive was generated by a fusion of Pipermail (Mailman edition) and MHonArc.