Some Quasi specification issues
allen at wirfs-brock.com
Mon Jul 2 17:30:51 PDT 2012
On Jul 2, 2012, at 5:11 PM, Brendan Eich wrote:
> Erik Arvidsson wrote:
>>> 4) Should we also have a mostly raw tag that treats everything as raw except
>>> > for explicit line continuation?
>> I don't care.
> When in doubt, leave it out.
>>> > 5) Simplify the "call site object" to be an array
>> I like it.
> For some engines (perhaps ones that should get busy optimizing), making an array have named expando properties deoptimizes accesses to indexed elements.
> On the other hand Allen's proposal makes two objects where the harmony:quasis proposal makes three.
In eiher case, the objects are born frozen so the named properties shouldn't really have to be treated as expandos.
Also, they are probably statically allocable with program duration lifetimes. The wiki spec. is a bit unclear on this point. It says, that the call site objects is logically "hoisted into the top module scope". Presumably the intent of that statement is that there is statically one of these objects per physical call site rather than one per closure per physical call site. From an implementation perspective I'd prefer the one per physical site interpretation. However, the spec also says that a tag function can use these call site objects as cache keys. I can imaging that there might be caching situations where per closure identity would be more desirable.
More information about the es-discuss