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.
Uh oh!
There was an error while loading. Please reload this page.
-
I would suggest passing something like
name=nullfor each non-method-call kind of operation, and then encode the operation in either theargsargument tosyscall.send:['g', 'foo']get propertyfoo['s', 'foo', 'bar']set propertyfootobar['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 theEproxy 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