[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] ECMAscript: Bind type names to constructor functions in the

From: Julian Graham
Subject: Re: [PATCH] ECMAscript: Bind type names to constructor functions in the global env.
Date: Mon, 16 Jan 2017 20:23:58 -0500

On Mon, Jan 9, 2017 at 4:20 PM, Andy Wingo <address@hidden> wrote:
> I am happy to include patches like this one.
> Yet -- *program-wrappers*, what is that about?  I don't even remember
> any more.  I guess it's for setting a property on a function instance,
> even if the function is a normal Guile function?  I guess I am skeptical
> given that the hash table is doubly weak.

My read is that it's an explicit bridge between a normal Guile
function and a more ECMAScript-y function object representation of
that function. That is to say, an attempt to have one's cake
(functions that act like other JS objects) and eat it, too ("native"
function application). If Guile's ES implementation continues to
develop (and I hope it does!) a good reason may present itself that ES
Functions can't continue to also be native Guile functions under the
hood. But if we agree on the idea behind that table, I don't see why
that change has to happen now.

> Please don't assume that the existing code is good or even correct :) We
> have all learned many things since 2009 -- this flip side of that being
> that I know I was much more ignorant back then :)

Well, I think it works, and it's pretty cheap. Per the above, I think
the alternative is to redesign the ES functions implementation in a
way that makes functions look a lot more like objects, such that they
can no longer be applied "directly." But I was hoping to defer doing
that until the core object implementation and of the behavior of
prototypes was a bit further along, with more test coverage, etc. I
don't know. What do you think?

reply via email to

[Prev in Thread] Current Thread [Next in Thread]