> I'm not sure I understand the benefit of making it easy to develop APIs where 
> foo.bar() is not roughly equivalent to (x = foo.bar).apply(foo). Am I 
> misunderstanding something?

Right. Keeping that invariant is important.

I’d like to avoid (the cognitive and performance cost of) having to curry 
whenever you implement methods via a proxy (which seems the most important use 
case for proxies).

Being able to distinguish between a property read access and a method 
invocation (which, spec-internally, you can do via a reference) is indeed 
rarely interesting. It could be used for ProxyMap, but that seems iffy, 
design-wise:

let pm = new ProxyMap();
pm.size = 123; // create a map entry
pm.size(); // invoke the size() method

-- 
Dr. Axel Rauschmayer
[email protected]

home: rauschma.de
twitter: twitter.com/rauschma
blog: 2ality.com

_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to