Pipelining of nameless or non-method-calls #5478
Replies: 4 comments
-
@michaelfig I think this one is the two of us. |
Beta Was this translation helpful? Give feedback.
-
@michaelfig and I were talking about something related today (#2691), and I wanted to update a few notes.
const x = (arg1) => 'result';
x.prop1 = (arg2) => 'other result';
return Far('iface', x);
|
Beta Was this translation helpful? Give feedback.
-
That part is already done. |
Beta Was this translation helpful? Give feedback.
-
@Chris-Hibbert mentioned using
So it's not exactly passing silently, but it depends upon someone attaching an error handler to the non-method |
Beta Was this translation helpful? Give feedback.
-
I would suggest passing something like
name=null
for each non-method-call kind of operation, and then encode the operation in either theargs
argument tosyscall.send
:['g', 'foo']
get propertyfoo
['s', 'foo', 'bar']
set propertyfoo
tobar
['d', 'foo']
delete propertyfoo
['a', ['arg1', 'arg2', 'arg3']]
nameless invocation with argsAside: Fluent Proxy
As far as the
E(x)
expansion for getters, etc, I don't think we'd pollute theE
proxy maker with those concerns. Mark and I discussed having something else, sayE.C(x)
which would make an unambiguous chainable (i.e. fluent) proxy that could do methods, getters, setters, deleters, and result promises by selecting the operation you want before you invoke it with the name you're interested in.Something like:
So,
I will reference this issue when we work out more of the details and put together a proposal for the eventual-send repository.
Beta Was this translation helpful? Give feedback.
All reactions