[e-lang] Q: asynchronous tail recursion?

Constantine Plotnikov constantine.plotnikov at gmail.com
Mon Jan 15 00:47:43 CST 2007


On 1/2/07, Kevin Reid <kpreid at mac.com> wrote:
> On Jan 2, 2007, at 11:30, Mark S. Miller wrote:
> > Kevin Reid wrote:
> >> My answer is that it depends on the type of incoming reference.
> >> Remote weak references would have their own incoming and outgoing
> >> tables. The incoming table would be weak-valued.
> >>
> >> When you make a weak reference, the maker would note that the target
> >> is a Far-proxy, and requests the ref's comm system to make a weak
> >> outgoing reference.
> >
> > IIUC, what you're proposing is essentially a normal far reference
> > to a weak-reference object, which itself would be local to the
> > object it designates. Once we support genuine Data-E
> > PassByConstruction, this should be an adequate hook for causing the
> > remote creation of such a weak reference. AFAICT, this should work
> > fine.
>
> As far as I can think, you're right. Further refinements such as
> discarding the table entries as soon as the weak ref breaks can be
> implemented nonprimitively.
>
This looks like a working solution. It looks less efficient than based
on compiler because it requires maintenance of the weak references and
increases both traffic and number of created objects, but it basically
does the same thing and it is compatible with current E implementation
approach.

Also garbage collector must support weak references. The weak
references support is very useful feature, so I think it is a weak
requirement. A minor complication is that conservative garbage
collectors have problem with supporting weak references due to obvious
reasons, so native-E implementation will have to use some precise GC
from start.

Constantine


More information about the e-lang mailing list